Interpolate/Adjust to new Sampling Rate
34 views (last 30 days)
Show older comments
Felix Westphal
on 18 May 2020
Commented: Star Strider
on 20 May 2020
Hello,
i have data received from a accelerometer with a sampling frequency of 10Hz.
But the time stamps in the data file are not equidistant, the sampling time interval is changin.
How can i "fix" the time stamps with my corresponding acceleration values?
So far i have just calculated the mean value for the sampling time interval (for further fft calculations) -> t_s = mean(diff(t))
Is there a better way to do that? maybe by interpolation?
0 Comments
Accepted Answer
Star Strider
on 18 May 2020
Use the Signal Processing Toolbox resample function. The advantage it offers over simply interpolating is that it uses an anti-aliasing filter to keep the resamples signal free of extraneous frequencies.
4 Comments
More Answers (0)
See Also
Categories
Find more on Multirate Signal Processing in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!