function fixedpt %fixedpt.m produces the step diagram corresponding to fixed point %iteration. a=3.6; %try a=3.5 versus a=3.6 x=zeros(1,51); x(1)=0.5; for k=1:50 x(k+1)=3.6*(x(k)-x(k).^2); end x=[x;x]; x=x(:)'; plot(x(1:end-1),x(2:end),'b') hold on xf=linspace(0,1,200); plot(xf,3.6*(xf-xf.^2),'k',[0 1],[0 1],'r')