fn=inline('2*x./(1 + x./50)','x');
fxpt=inline('2*x./(1 + x./50)-x','x');
fzero(fxpt,25)
xmin=0;
xmax=100;
N=15;
dx=(xmax-xmin)/10;
x=xmin:dx:xmax;
y=fn(x);
plot(x,y,'b')
set(gca,'FontSize',18)
hold on
%plot([xmin xmax],[0 100],'k','Linewidth',1.5)
%plot([0 100], [min(y)-.1 max(y)+.1],'k','Linewidth',1.5)
plot([xmin xmax],[xmin xmax],'g');
x0=.85;
Y=[x0];
xx=x0;
for i=1:N
yy=fn(xx);
Y=[Y yy];
xx=yy;
end;
YY(1)=Y(1);
for i=1:N
XX(2*i-1)=Y(i);
XX(2*i)=Y(i);
YY(2*i)=Y(i+1);
YY(2*i+1)=Y(i+1);
end;
XX(2*N+1)=Y(N+1);
plot(XX,YY,'r','LineWidth',1.5);
axis([xmin xmax min(y)-.1 max(y)+.1])
grid on
hold off