Почему я не могу отобразить данные на каждой итерации в одном и том же окне? Я пробовал с drawnow
, но он не работает. Код:
t=0;
T=10;
i =1;
while t<T
. . .
time(i)=(i-1)*delta_t;
scrsz = get(0,'ScreenSize');
figure('position',[80 60 scrsz(3)-110 scrsz(4)-150]);
subplot(1,3,1);
plot(time(i),configurations(1,1,i),'-b','LineWidth',2), hold on;
drawnow;
xlabel('Time[s]');
ylabel('X [m]');
subplot(1,3,2);
plot(time(i),configurations(3,1,i),'-b','LineWidth',2), hold on;
drawnow;
xlabel('Time[s]');
ylabel('Z [m]');
subplot(1,3,3);
plot(time(i),configurations(2,2,i),'-b','LineWidth',2), hold on;
drawnow;
xlabel('Time[s]');
ylabel('\phi [deg]');
t=t+1;
i=i+1;
end