Increase matrix size, with the first matrix a the center of the new matrix
1 view (last 30 days)
suppose to have a matrix (2000x2000) now i want to copy it in a bigger matrix (4000x4000 for example), with the original matrix at the center of the second matrix, and the other values set to 0. How can I do?
I have done it with for loop, but it is slow