MATLAB: How to insert rows and colums of zeroes in this matrix ??? a=[1 2 3;4 5 6] MATLAB how to insert rows and colums of zeroes in this matrix ??? a=[1 2 3;4 5 6] Best Answer Here is one quick way to interlace columns and rows of zeros:>> a=[1 2 3;4 5 6];>> b = zeros(2*size(a));>> b(1:2:end,1:2:end) = ab = 1 0 2 0 3 0 0 0 0 0 0 0 4 0 5 0 6 0 0 0 0 0 0 0 Related SolutionsMATLAB: How to add zeros column and row at the beginning of matrix new_A=zeros(size(B));new_A(2:end,2:end)=A; MATLAB: “medianfiltermex” ?? Sorry. All .mex files provided with MATLAB do not have the source code provided. Related QuestionNormalization , colums, rows
Best Answer