matlab - How to eliminate series of values with so much variation -
i got dataset (azimuth vs time) measure compass of object trough time. can see when object moving (the compass vary much), , when it's static, without moving (compass not vary). question how program in matlab in order eliminate data show object moving , filter data shows object static.
for example:
azimuth (angle) | 30 30 30 15 10 16 19 24 24 24 17 14 12 15 16
time (s) | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
the output be:
azimuth (angle) | 30 30 30 24 24 24
time (s) | 1 2 3 8 9 10
s=diff(azumuth)==0 %diff skip values @ t=1 , t=8. modify include them well: s=[s(1),s(2:end)|s(1:end-1),s(end)] azumuth(s) time(s)
Comments
Post a Comment