Logistic Map Bifurication Diagram
5 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Trying to plot the logistic map bifurication diagram, but keep getting errors... can someone take a look at this and tell me where I am going wrong.
c=0;
y=0.0;
hold on
while c < 1
for i=1:100;
y = -c*y.^2 +c*y.; %converge the iteration
end
for i=1:20
y = -c*y.^2 +c*y.;
plot(c,y,'.', 'MarkerSize',1); % plot the converged points
end
c=c+0.002;
end
0 Kommentare
Antworten (1)
David Young
am 4 Mär. 2011
There are various problems:
There's a syntax error due to the dot at the end of
y = -c*y.^2 +c*y.;
Since y is a scalar, you can just omit the dot, and use
y = -c*y.^2 +c*y;
c in the range 0 to 1 produces uninteresting behaviour - to see bifurcation you could scan c through the range 2.8 to 4.
y needs to be initialised inside the outer loop (after the while) otherwise it just starts from whatever the previous value was. However, initialising to 0 (or to 1) will produce uninteresting behaviour. Try initialising y to 0.5.
With these changes, you can get a bifurcation plot.
0 Kommentare
Siehe auch
Kategorien
Mehr zu Nonlinear Analysis finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!