I made the code but the loop does not stop when the (if condition) accusers (column i+1=column i) but it stop the loop after several iteration of column equals . . it is must stop after 5 iteration but stop after 15 . .
X1=[0;0;0]; for i=1:inf X1(1,i+1)=(7.85+0.1*X1(2,i)+0.2*X1(3,i))/3; X1(2,i+1)=(-19.3-0.1*X1(1,i)+0.3*X1(3,i))/7; X1(3,i+1)=(71.4-0.3*X1(1,i)+0.2*X1(2,i))/10; if ( X1(:,i+1) == X1(:,i)) break end end
Best Answer