function [xk,xk1]=cob(y0,a)
%Diagrama cobweb
global alfa
alfa=a;
n=200; [t,y]=eulere('quadr',0,n,y0,n);
m=length(y); p=m-1;
A=[zeros(m,1) eye(m,p)];
xk=y';
xk1=A*xk;
x=0:0.05:1;
plot(x,x,'k',x,alfa*x.*(1-x),'r'); hold on
stairs([xk(1); xk(1:p)],[0; xk1(1:p)])
