// modele  logistique u_{n+1}= r * u_n *(1-u_n)
// G. Chiavassa



/// iteres de la suite



// N valeurs de la suite en partant de u0 et pour r

clear

deff("y=f(x)","y=r*x.*(1-x)");

function [u]=trajectoire(r,u0,N)

 u(1)=u0;

  for i=2:N+1
   u(i)=f(u(i-1));
  end;

 x=[0:0.01:1];
 y=f(x);

 xset("window",0);
 // plot2d(x,y);
 // plot2d(x,x);


endfunction;



xset("window",0);
clf();

rmin=3.96;
rmax=3.9615;
dr=(rmax-rmin)/500;

for r=rmin:dr:rmax

  u0=min(1,rand(1));
   
  u=trajectoire(r,u0,5000);
  
  plot2d(ones(1,50)*r,u($-49:$),0,rect=[rmin,0,rmax,1]);



end;
  

  
  

 






