MATLAB: I am unable to get display of each iteration!! please HELP

iterationMATLAB

i am unable to get display of each iteration!! please HELP
clc;
clear variables;
x=[0;0];
for iter=1:30
for i=1:99
x(1)=4+x(2);
x(2)=0.5*(1-x(1));
end
disp(['iter',num2str(iter),';value= ',num2str(x)]);
end

Best Answer

Your x is a column vector. num2str(x) has two rows. But 'value= ' only has one row, and you cannot [] together one row with two rows.
If you were to use num2str(x.') then that would work out.
Related Question