3
我有以下代码Matlab。情节
T = [0:1:30]
a = [5:1:35]; a2 = [0:1:30];
b = [-4:1:26]; b2 = [12:1:42];
c = [16:1:46]; c2 = [15:1:45];
d = [2:1:32]; d2 = [-5:1:25];
figure(1)
title('Time histories of output variables (measured vs estimated)')
subplot(411),plot(T,a, T,a2,'r'); grid; ylabel('p (°/s)');
subplot(412),plot(T,b, T,b2,'r'); grid; ylabel('r (°/s)');
subplot(413),plot(T,c, T,c2,'r'); grid; ylabel('phi (º)');
subplot(414),plot(T,d, T,d2,'r'); grid; ylabel('ay (m/s2)');
legend('measured','estimated','Location','bestoutside')
xlabel('Time [s]');
我想有剧情之外,所有他们的传说仍然与正常大小外的地方传说。 (所以传说应该是在那些红色圆圈中的一个。任何解决方案?
我按照您的建议直接运行代码,空子图在那里,但图例没有显示出来。我收到错误“Warning:Plot empty。 >在286的传说中” –
@FernandoBastosGarcía:你正在运行什么版本的MATLAB? – gnovice
2013B。无论如何,我找到了一个解决方案,plot(1,1,1,1,'r'),而不是nans –