how to plot Bifurcation Diagram of chaotic map
10 次查看(过去 30 天)
显示 更早的评论
How to plot bifurcation diagram for 3 variables x,y and z of the following chaotic map:
numsteps = 1000; % number of steps to iterate
a=0.9; b=-0.6013; c=2; d=0.5; % fix conditions
x(1) = -0.72; y(1) = -0.64; z(1)=0.5; %initial values
for i = 1:numsteps;
x(i+1) = (x(i)).^2 - (y(i)).^2 + a*x(i)+b*y(i);
y(i+1) = 2*x(i)*y(i) + c*x(i) + d*y(i);
z(i+1) = sin(3.5*z(i));
end
0 个评论
回答(1 个)
Jim Riggs
2019-2-10
编辑:Jim Riggs
2019-2-10
You can plot all of the data in 3 dimensions using
figure;
plot3(x,y,z,'ob')
This will create a 3D plot using a marker at each data point. You can then rotate the group of points in the figure window to see the patern from different perspectives using the "Rotate 3D" button at the top of the figure window.
This pattern is only visible in the X-Y plane, so you need to rotate the 3D plot so that you are viewing from the top.
An alternative is to just make a 2D plot using the x and y data:
figure;
plot(x,y,'ob')
(Also, since you are using a fixed number of steps for the loop, you should preallocate your vectors, e.g.
clear x y z;
numsteps=1000;
x = zeros(numsteps+1,1);
y = zeros(numsteps+1,1);
z = zeros(numsteps+1,1);
...
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Image Processing Toolbox 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!