MATLAB: Can someone help me code “Add the first row to every row other than the first row” for this setup

matrixrow operations.

Hi how do i add the first row to every row but the first row?

Best Answer

k=input('Enter Array in []');
[rows colm]=size(k);
for i=2:rows 
      for j=1:colm
          k(i,j)=k(i,j)+k(1,j);
      end    
end
disp(k);