How can I resample 50Hz signal to 30Hz?

S
sania urooj · Dec 10, 2021 · 2.3K views
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?
Expert Answer
Profile picture of John Michell
John Michell PhD Expert
Answered Aug 24, 2026
It’s always best to upsample rather than downsample because it’s easier to design filters for them.
 
If you must, use the  Signal Processing Toolbox resample funciton:
S50 = ...;                                                  % Signal Sampled At 50 Hz
S30 = resample(S50, 3, 5);                                  % Resampled Signal At 30 Hz
Use resample rather than interp. The resample function incorporates a FIR anti-aliasing filter.
 
100% Run Guarantee 3-Hour Fast-Track Delivery

Need a Custom Version or Complete Simulation for This Problem?

Our 500+ PhD engineers build, debug, and optimize working MATLAB scripts and Simulink (.slx) models tailored to your exact assignment rubrics with zero plagiarism.

Tested on MATLAB R2024b / R2026a
Turnitin 0% Plagiarism Report
Free 7-Day Revisions Guarantee
Have a different question? Ask here

Get a Free Consultation or a Sample Assignment Review!