How to design a moving average filter over a variable time array
显示 更早的评论
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!
采纳的回答
更多回答(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 个评论
Image Analyst
2016-3-13
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
2016-3-14
@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
2016-3-14
类别
在 帮助中心 和 File Exchange 中查找有关 Matched Filter and Ambiguity Function 的更多信息
产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!