Hi,
I am plotting the bifurcation diagram for the map
x_(n+1)= x_n + (tn*r)+ rho* x_n*(1x_(n1)), n=0,1,2,...,
t is the time should be between n*r and (n+1)*r.
What's wrong in the code! I should have got a diagram not a point!!!
% define the vector of colors, to plot the dat aof reach value of r in
% different color
color_vec = ['b'];
r=0.5;
for rho = 0: 0.001:4
% define the number of deiscrete times in interval [k*r, (k+1)*r]
n = 10;
% define the nimber of iterations k = 1,.....,Nit
Nit = 50;
% define the initial vector which is a vector of size n
x0 = 0.3*ones(1,n);
% define vectors x_next and x_previous
x_next = zeros(1,n);
x_previous = zeros(1,n); %x_n
x_pp=zeros(1,n); %x_n1
time = zeros(1,n);
% initialize x_previous
%x_previous = x0;
x_pp=0.2*ones(1,n); %x_n1
hold on
for i = 1:Nit
time = linspace(i*r,(i+1)*r,Nit);
x_next = x_previous+(time(i)i.*r)*rho*x_pp.*(1x_pp);
%x_previous = x_next;
end
end
plot(rho,x_next(1),'b.')
I need your help if you please.
Thanks a lot in advance.
