max_itr=10000
tolerance=10.^-6
I1(1)=0
I2(1)=0
I3(1)=0
for j=1:2:100
for i=1:max_itr-1
I1(i+1)=(j+10*(2*I2(i)+I3(i)))/70;
I2(i+1)=(2*(2*I1(i)+I3(i)))/11;
I3(i+1)=(I1(i)+I2(i)+20)/5;
if norm([I1(i) I2(i) I3(i)]-[I1(i+1) I2(i+1) I3(i+1)])<tolerance
break
end
end
[m n]=size(I1);
[o p]=size(I2);
[q r]=size(I3);
A3(1,j)=I1(1,n);
A3(2,j)=I2(1,p);
A3(3,j)=I3(1,r);
end
H=[0 p]
A3'
clear filename
filename=['A3','.dat']
save(filename,'j','-ASCII')
^^^ MATLAB. I'm not sure if that code will run properly yet. Lol.