观察Lorenz在各个不同维度上的相图。
lorenz_demo(50)
function xdot = g(t,x)
xdot = zeros(3,1);
sig = 10.0;
rho = 28.0;
bet = 8.0/3.0;
xdot(1) = sig*(x(2)-x(1));
xdot(2) = rho*x(1)-x(2)-x(1)*x(3);
xdot(3) = x(1)*x(2)-bet*x(3);
end
function lorenz_demo(time)
[t,x] = ode45(@g,[0:0.01:time],[1;2;3]);
plot3(x(:,1),x(:,2),x(:,3))
figure,
plot(x(:,1),x(:,2))
figure,
plot(x(:,1),x(:,3))
figure,
plot(x(:,2),x(:,3))
end