2010/rob10/slotcar: plotSlotCarRacerData.2.m

File plotSlotCarRacerData.2.m, 0.7 KB (added by rjuston, 8 years ago)

plots the slot car racer log data

Line 
1%% load data
2load SlotCarRacer-2010-07-06T22-40-46+0200
3
4%% plot controller data
5% filter measurements with box filter
6n=10;
7box=ones(n,1);
8mf=conv(box,meas)/n;
9m=length(mf);
10mf=mf(n:m);
11figure(1);
12plot(ts,meas,ts,mf,ts,des,'r','linewidth',2)
13xlabel 'time (s)'; ylabel 'speeed (PPS)'
14save SlotCarRacer-2010-07-06T22-40-46+0200
15set(gca,'xlim',[0,70])
16
17%% plotb throttle response
18figure(1)
19load 'SlotCarRacer-2010-07-13T06-40-14+0200 calib #2 blue car intermed'
20plot(data(:,1),data(:,4),'r--',data(:,1),data(:,5)*2250,'b--','LineWidth',2)
21xlabel time (ms)
22legend('Speed (pps)','Throttle (0->0.1)');
23
24
25%% XY scalar plot
26figure(2)
27
28plot(data(:,2),data(:,3),'r--','LineWidth',2)
29xlabel X (pixel)
30ylabel Y (pixel)
31