function x=Diagrama(x0,mu,N0,N) 
%ejemplo: Diagrama(0.2,[0.0:0.001:2],300,1000); 
%x0=0.2; Valor inicial 
%mu=0:0.1:2; parámetro de F(x) 
%N0=100; Transitorios
%N=1000; Puntos a visualizar;  
M=length(mu); 
x=zeros(N+1,M); 
for m=1:M 
   xx = x0;
   for n=1:N0
      y=F(mu(m),xx);
      xx = y;
   end 
   x(1,m)= xx;
   for n=1:N 
     x(n+1,m)=F(mu(m),x(n,m)); 
   end 
end 
plot(mu,x,'.k','markersize',0.001);
title('Diagrama de Biburcacion'); 
xlabel('mu'); 
ylabel('x(n)'); 


function y=F(mu,x) 
   if (x >=0.0) && (x <= 0.5)
      y=mu*x; 
   else
      y=mu*(1-x);
   end
   
function y=Fb(mu,x) 
   y=mu*x*(1-x); 
