If I have the for loop:
for i=1:3 for j=2:4 A(i,j)=B(i+2,j+1); endend
How could I convert this into a while loop? I've tried:
i=0; j=1; while (i<4 && j<4) i=i+1; j=j+1; A(i,j)=B(i+2,j+1);end
But its not giving the same results. This is also assuming A and B are 5×5 arrays.
Best Answer