is it possible to upsampling or down sampling by a non-integer number?

153 views (last 30 days)
I have two files that I need to synchronise one is sampled at every 3ms = 1/0.003 = 333.33Hz and one at every 10ms = 1/0.01 = 100Hz. I have not been able to find a matlab command in basic or signal processing toolbox to either upsample to 100Hz to 333.33 or downsample 333.33 to 100Hz. Can anyone help?

Accepted Answer

Greg Dionne
Greg Dionne on 1 Sep 2017
In case someone else is looking at this... have a look at resample.
  1 Comment
Abdelwahab Afifi
Abdelwahab Afifi on 24 Oct 2020
I'm using resample function to upsample my data. I need to increase the stop band attenuation to improve the Adjacent channel power ratio (ACPR) . How can i do that?

Sign in to comment.

More Answers (2)

Matt J
Matt J on 14 May 2013
You need to interpolate, e.g., using interp1() or griddedInterpolant()
Jan on 30 Aug 2017
Edited: Jan on 30 Aug 2017
@Justine: The message is clear. The interpolation requires strict monotonically increasing data as input. Obviously your code provides something else.

Sign in to comment.

Jan on 14 May 2013
Edited: Jan on 14 May 2013
Matlab's upsample and downsample are not really useful here. I'd prefer the alreayd mentioned interp1, but decimate would perform an anti-aliasing also.

Sign in to comment.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!