📄 yunxing2b.m
字号:
%***********加上x4,x5,x6后,ex,ey,ez扩充为状态变量的情况下常微分方程曲线图**********
[t,y]=ode45('observability2b',[0:2:35*3600],[3*pi/(60*180);3*pi/(60*180);5*pi/(60*180);5*pi/(60*180);5*pi/(60*180);6*pi/(60*180);0;0;2*pi/(60*180);0.01*pi/(180*3600); 0.01*pi/(180*3600); 0.01*pi/(180*3600)]);
yy=zeros(501,12);
%每隔126点保存一次,放在矩阵yy
yy(1,:)=y(1,:);
for j=1:500
for i=2:127
yy(j+1,:)=y(126*j+1,:);
end
end
x1=yy(:,1)*180*60/pi;
x2=yy(:,2)*180*60/pi;
x3=yy(:,3)*180*60/pi;
x4=yy(:,4)*180*60/pi;
x5=yy(:,5)*180*60/pi;
x6=yy(:,6)*180*60/pi;
x7=yy(:,7);
x8=yy(:,8);
x9=yy(:,9)*180*60/pi;
x10=yy(:,10)*180*3600/pi;
x11=yy(:,11)*180*3600/pi;
x12=yy(:,12)*180*3600/pi;
t=0:252/3600:35;
%舰体姿态误差角
subplot(3,4,1)
plot(t,x1,'b');
xlabel('t');
grid on;
subplot(3,4,2)
plot(t,x2,'r');
xlabel('t');
grid on;
subplot(3,4,3)
plot(t,x3,'y');
xlabel('t');
grid on;
%弹体误差角
subplot(3,4,4)
plot(t,x4,'b');
xlabel('t');
grid on;
subplot(3,4,5)
plot(t,x5,'b');
xlabel('t');
grid on;
subplot(3,4,6)
plot(t,x6,'b');
xlabel('t');
grid on;
%速度误差
subplot(3,4,7)
plot(t,x7,'g');
xlabel('t');
grid on;
subplot(3,4,8)
plot(t,x1,'m');
xlabel('t');
grid on;
%经度误差角
subplot(3,4,9)
plot(t,x9,'c');
xlabel('t');
grid on;
%扩充的状态变量
subplot(3,4,10)
plot(t,x10,'b');
xlabel('t');
grid on;
subplot(3,4,11)
plot(t,x11,'b');
xlabel('t');
grid on;
subplot(3,4,12)
plot(t,x12,'b');
xlabel('t');
grid on;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -