本文主要介绍了Lorenz模型、Rossler模型、Logistic映射以及其代码实现
1.Lorenz模型
%sy.m
t = -10*pi:pi/250:10*pi;
comet3((cos(2*t).^2).*sin(t),(sin(2*t).^2).*cos(t),t);
Lorenz.m
function xdot=lorenz(~,x)
xdot = [-8/3,0,x(2);0,-10,10;-x(2),28,-1]*x;
命令行:
过程图:
x0=[0,0, 1e-10]';
[t,x]=ode45(@lorenz,[0,1000],x0);
plot(t,x);
figure;
comet3(x(:,1),x(:,2),x(:,3));
%plotdata
x0=[0,0, eps]';
[t,x]=ode23(@lorenz,[0,100],x0);
plot3(x(:,1),x(:,2),x(:,3));
axis([10 40 -20 20 -20 20]);
2.Rossler模型
%rossler.m
function xdot=rossler(t,x)
xdot = [0.9*x(2)*x(1);-x(1)-x(3);x(2)+0.15*x(3)];
命令行:
当t_final=1000时:
t_final=1000; x0=[0;0;1