Filter löschen
Filter löschen

velocity and acceleration - apply filter

1 Ansicht (letzte 30 Tage)
joo
joo am 20 Nov. 2012
i use this code to obtain the velocity and acceleration from x,t data (by using central differences).
but as you can see now i need to apply some _filter _ (i think i should apply it in the x data also) . can anyone help me please?
  1 Kommentar
Ryan G
Ryan G am 20 Nov. 2012
It looks like you already acquired your data. How did you obtain the position data? Does your mechanism have accelerometers? What you're seeing and will continue to see using this method is excessively noisy and potentially inaccurate data.
That being said, why do you need to filter the data? What is the data being used for?

Melden Sie sich an, um zu kommentieren.

Akzeptierte Antwort

Ryan G
Ryan G am 20 Nov. 2012
You could try using the smooth function.
This will smooth the data with a moving average filter. As you mentioned you only wish to observe the data, this should be adequate.
Try this as an example:
y = sin(0:0.01:10)+rand(1,1001);
yy = smooth(y);
plot(y)
hold on
plot(yy,'r')
You can see the difference.

Weitere Antworten (0)

Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by