-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathPlot_testFilter.m
More file actions
executable file
·35 lines (31 loc) · 952 Bytes
/
Plot_testFilter.m
File metadata and controls
executable file
·35 lines (31 loc) · 952 Bytes
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
32
33
34
35
% test filter
nT = length(nx0);
dnew = cat(1,nan,sqrt(diff(tnx).^2+diff(tny).^2));
figure(1); clf;
plot(x0,y0,'.','markersize',1,'color',[0.5 0.5 0.5]);
hold on;
for iT=1:nT
if iT>5
P1 = plot(x0(iT-5:iT),y0(iT-5:iT),'ko-','markersize',10);
P5 = plot(nx0(iT-1:iT),ny0(iT-1:iT),'gx-','markersize',5);
P6 = plot(tnx(iT-1:iT),tny(iT-1:iT),'bs-','markersize',5);
else
P1 = [];
P5 = [];
P6 = [];
end
P2 = plot(x0(iT),y0(iT),'ro','markersize',10);
P3 = plot(nx0(iT),ny0(iT),'gx','markersize',5,'linewidth',2);
P4 = plot(tnx(iT),tny(iT),'bs','markersize',5,'linewidth',2);
title(sprintf('Frame %d, x(t)=%0.2f (%0.2f)',frame0(iT),x0(iT),time0(iT)),'fontsize',24);
if dnew(iT) < 10 || isnan(dnew(iT))
else
pause;
end
delete(P1);
delete(P2);
delete(P3);
delete(P4);
delete(P5);
delete(P6);
end