I have a 16X16 matrix. I have to add it to a 256X256 matrix. Can anyone help me how to make this 16X16 matrix into 256X256 filling the remaining with zeros?
Matlab automatically pads with zeros if you assign something to an element outside of the original size.
>> A = rand(16, 16); >> A(256, 256) = 0; >> size(A) ans = 256 256