Use resample rather than interp. The resample function incorporates a FIR anti-aliasing filter.
Question
I have a accelerometer data whose sample rate is 50Hz. Now, I want to resample this data to 30Hz. How can I do it? I have tried functions like resample, interp and decimate but all of them require the factor to be an integer which is not in this case. Is there any function which can work with non integer factor?
Related Questions
Expert Answer
John Michell
PhD Expert
Answered Nov 20, 2025
It’s always best to upsample rather than downsample because it’s easier to design filters for them.
S50 = ...; % Signal Sampled At 50 Hz S30 = resample(S50, 3, 5); % Resampled Signal At 30 Hz
Have a different question? Ask here