Hi all! How can I rewrite this for loop in a while?
for i = 2:sum(1: (rows - 1)) if (i > sum(1: (x))) x ++; endif if ( (i == sum(1:(x))) || (i == sum(1: (x - 1)) + 1)) A(i,i) = 5; else A(i,i) = 6; endifendfor
Best Answer