function x=feigenbaum(x0,mu,N0,N) 
%ejemplo: feigenbaum(0.2,[3.5:0.0005:4],300,1000); 
%x0=0.2; valor inicial 
%mu=1:0.1:4; parámetro de f(x)=mu*x*(1-x) 
%N0=100;  N=200;  
M=length(mu); 
x=zeros(N+1,M); 
for m=1:M 
   xx = x0;
   for n=1:N0
      y=Fb(mu(m),xx);
      xx = y;
   end 
   x(1,m)= xx;
   for n=1:N 
     x(n+1,m)=Fb(mu(m),x(n,m)); 
   end 
end 

plot(mu,x,'.k','markersize',0.001);

title('Biburcacion de Feigenbaum'); 
xlabel('mu'); 
ylabel('x(n)'); 


function y=Fb(mu,x) 
   y=mu*x*(1-x); 
