How to design a moving average filter over a variable time array
Show older comments
Hi!
So basically i'm given an array of accelerometer data with a sample timestamp and ax,ay, and az accelerations. The sample frequency is variable in the sense that the timestamps do not have a constant delta-t between them. I'm asked to filter the data using a moving average filter that covers .1s of data capture. I am new to filtering and am unsure on where to even begin here.
Thanks!
Accepted Answer
More Answers (1)
If you provide example data, it would be possible to post some real code.
You can perform a linear interpolation at first to obtain the values with a fixed frequency. Afterwards a standatd moving average filter using conv or filter can be applied:
B = repmat(0.1, 1, 10); % E.g. a 10 point window
out = filter(B, 1, Signal);
3 Comments
Image Analyst
on 13 Mar 2016
Dangerous Website Blocked
You attempted to access:
This is a known dangerous website. It is recommended that you do NOT visit this site. The detailed report explains the security risks on this site.
For your protection, this web page has been blocked. Visit Symantec to learn more about phishing and internet security.
Exit this site
Jan
on 14 Mar 2016
@Corey: I assume you are able to import the data already. If so, please provide a MAT file and attach it as file directly in the forum. The less trouble the helpers have, the better.
What repmat does is explained exhaustively in the documentation:
doc repmat
Corey Peruffo
on 14 Mar 2016
Categories
Find more on Matched Filter and Ambiguity Function in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!