MATLAB: Transfer from fix array to another array

for looplooploopswhile loop

Hi I have this code below.I Want to store what will come in w((1),:) in another array called M((N),:) for 113 iteration. For example, in iteration one in w((1),:) store in M((1),:) , w((1),:) store in M((2),:) and w((1),:) store in M((3),:) and so on until reach to N Which is 113 N=113 for i = 1:N for j= 1: N E(j) = y((j),:)-w((1),:)*x(: , (j)) ; w((1),:)=w((1),:)+E(j)*0.01*z((j),:) ; end end

Best Answer

M = repmat(w(1,:),N,1);
Related Question