6.三维、二维以及时间序列图:
耦合系统的函数程序:
function dx=ouhe(t,x)
dx=zeros(3,1);
a=3;u=2;
dx(1)=-u*x(1)+x(2)*(x(3)+a);
dx(2)=-u*x(2)+x(1)*(x(3)-a);
dx(3)=x(3)-x(1)*x(2);
图程序:
clc;
clear;
[t,x]=ode45('ouhe',[0 1000],[1 -1 1]);
subplot(2,2,1); plot(x(:,1),'k','markersize',0.5);
xlabel('t/ms','fontsize',12,'fontName','times new Roman','fontweight','bold','color','k');
ylabel('x','fontsize',12,'fontName','times new Roman','fontweight','bold','color','k');
subplot(2,2,2); plot(x(:,2),'k','markersize',0.5);
xlabel('t/ms','fontsize',12,'fontName','times new Roman','fontweight','bold','color','k');
ylabel('y','fontsize',12,'fontName','times new Roman','fontweight','bold','color','k');
subplot(2,2,3); plot(x(:,3),'k','markersize',0.5);
xlabel('t/ms','fontsize',12,'fontName','times new Roman','fontweight','bold','color','k');
ylabel('z','fontsize',12,'fontName','times new Roman','fontweight','bold','color','k');
subplot(2,2,4); plot3(x(:,1),x(:,2),x(:,3),'k','markersize',0.5);grid on;
xlabel('x','fontsize',12,'fontName','times new Roman','fontweight','bold','color','k');
ylabel('y','fontsize',12,'fontName','times new Roman','fontweight','bold','color','k');
zlabel('z','fontsize',12,'fontName','times new Roman','fontweight','bold','color','k');
figure(2);plot3(x(:,1),x(:,2),x(:,3),'k','markersize',0.5);grid on;
xlabel('\itx\rm_1','fontsize',20,'fontName','times new Roman','fontweight','bold','color','k');
ylabel('\itx\rm_2','fontsize',20,'fontName','times new Roman','fontweight','bold','color','k');
zlabel('\itx\rm_3','fontsize',20,'fontName','times new Roman','fontweight','bold','color','k');