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

63 vues (au cours des 30 derniers jours)
Vida
Vida le 14 Mai 2013
Commenté : Walter Roberson le 21 Déc 2022
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?

Réponse acceptée

Greg Dionne
Greg Dionne le 1 Sep 2017
In case someone else is looking at this... have a look at resample.
  1 commentaire
Abdelwahab Afifi
Abdelwahab Afifi le 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?

Connectez-vous pour commenter.

Plus de réponses (2)

Matt J
Matt J le 14 Mai 2013
You need to interpolate, e.g., using interp1() or griddedInterpolant()
  2 commentaires
Justine  Nyakundi
Justine Nyakundi le 30 Août 2017
this gives an error 'not monotonically increasing'
Jan
Jan le 30 Août 2017
Modifié(e) : Jan le 30 Août 2017
@Justine: The message is clear. The interpolation requires strict monotonically increasing data as input. Obviously your code provides something else.

Connectez-vous pour commenter.


Jan
Jan le 14 Mai 2013
Modifié(e) : Jan le 14 Mai 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.
  4 commentaires
kim zheng cho
kim zheng cho le 21 Déc 2022
Hi and good day
I have a signal sampled at 4552 Hz. I want to downsample that signal to 4096 Hz. Do you know that how to do it?
thank you
Walter Roberson
Walter Roberson le 21 Déc 2022
resample 569, 512

Connectez-vous pour commenter.

Community Treasure Hunt

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

Start Hunting!

Translated by