📄 tu1.asv
字号:
clear;
t_space = [0 200];
[t,x] = ode45('fun_drive',t_space,[2,1,2]);
[tt,xx] = ode45('fun_drive',t_space,[1.5,0.5,1]);
[ttt,q] = ode45('fun_resp',[0,200],[2;1;2;1.5;0.5;0.5;1.5;0.05;0.05;0.05]);
figure(1);
subplot(3,1,1);
plot(t,x(:,1),tt,xx(:,1),'--');
ylabel('x1,x2');
xlabel('t');
subplot(3,1,2);
plot(t,x(:,2),tt,xx(:,2),'--');
ylabel('y1,y2');
xlabel('t');
subplot(3,1,3);
plot(t,x(:,3),tt,xx(:,3),'--');
ylabel('z1,z2');
xlabel('t');
%plot3(x(:,1),x(:,2),x(:,3));
figure(2);
plot(ttt,q(:,1),ttt,q(:,4));
ylabel('x1,x2');
xlabel('t');
figure(3);
plot(ttt,q(:,2),ttt,q(:,5));
ylabel('y1,y2');
xlabel('t');
figure(4);
plot(ttt,q(:,3),ttt,q(:,6));
ylabel('z1,z2');
xlabel('t');
figure(5);
plot(ttt,(q(:,1)-q(:,4)),ttt,(q(:,2)-q(:,5)),ttt,(q(:,3)-q(:,6)));
ylabel('ex,ey,ez');
xlabel('t');
figure(6);
plot(ttt,q(:,7));
ylabel('ex,ey,ez');
xlabel('t');
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -