请教一道matlab编程题

来源:百度知道 编辑:UC知道 时间:2024/05/08 19:53:15
问题如图,感谢各位帮忙

function dx=weifen(t,x)
a=10;b=8/3;r=28;
dx=[-a*x(1)+a*x(1);
r*x(1)-x(2)-x(1)*x(3);
x(1)*x(2)-b*x(3)];
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
t0=[0:10:1000];
x0=[1 1 1];%初值
[t x]=ode45('weifen',t0,x0);
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))