1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
| figure('Name',X);
for i=1:8
subplot(4,2,i);
axis([4 33 0 58]);
[Ai,Bi,Ci] = textread(list(i).name,'%d%d%d%*s','delimiter','\n','headerlines',96);
t=1;
while Ai(t)<2000 % to plot the first 2000ms in red
t=t+1;
end
plot(Bi(1),Ci(1),'or','markersize',7,'MarkerFaceColor','r');
hold on; % plot the departure
for g = 1:t-1
plot(Bi(g:g+1),Ci(g:g+1),'r'); % plot the first 2000ms in real time
pause(0.05);
end
hold on;
for g = t:length(Bi)-1
plot(Bi(g:g+1),Ci(g:g+1)) % plot the rest of the graph
pause(0.05);
end
xlabel('px');
ylabel('py');
title(list(i).name);
end |
Partager