clear all;
close all;

%  ------  Parameters  -------
Niterates   = 30;
Ntransients = 20;
lambda      = 3.6; 


%  -------  Initial Condition  -------
x0 = 0.1237;

%  ---------  Transients  -------
for j=1:Niterates
    x1   = lambda*x0*(1.0-x0);
    x0   = x1;
end;
  
%  ---------  Iterate  ---------
for j=1:Niterates
    x1   = lambda*x0*(1.0-x0);
    v(j) = x1;
    x0   = x1;
end;

t = 1:1:Niterates;
plot(t,v,'--o','Markersize',8,'MarkerFaceColor','r',...
    'MarkerEdgeColor','r','LineWidth',2);
xlabel('{t_n}','FontSize',16);
ylabel('{x_n}','FontSize',16);
legend('Logistic Map {x_{n+1}=\lambda x_n (1-x_n)}');
