MATLAB: Is it possible to copy a matrix with size (52×2) to another matrix with size (52×3)

copy

Hello everyone, I want to copy a matrix with size (52×2) to another matrix which is full of zeros (52×3) and I want the third column of (53×3) matrix to stay still full of zeros. Is it possible? And how can ı do it? Thank you

Best Answer

Source = randi(10, 52, 2); %for example
Target = zeros(52, 3);
Target(:,1:2) = Source;
Related Question