# How to resample a signal by a fraction

35 vues (au cours des 30 derniers jours)
Saed le 17 Mai 2013
Commenté : Kir le 25 Mai 2020
Hello,
I have the time-domain received signal v(t) and I want to re-sample it at as v(t/(1+a)), where a is not an integer and it is in the order of ~10^-3. How can I do that in MATLAB, since the resample function requires that both P and Q be integer?
Thanks
##### 0 commentairesAfficher -2 commentaires plus anciensMasquer -2 commentaires plus anciens

Connectez-vous pour commenter.

### Réponse acceptée

Matt Kindig le 19 Mai 2013
Modifié(e) : Matt Kindig le 19 Mai 2013
You could use interpolation instead. Something like this:
vnew = interp1( t, v, t/(1+a), 'linear');
You could use other interpolation approaches ('spline','cubic', etc.) as well, as appropriate.
##### 1 commentaireAfficher -1 commentaires plus anciensMasquer -1 commentaires plus anciens
Saed le 20 Mai 2013
This seems to work just fine.
Thanks

Connectez-vous pour commenter.

### Plus de réponses (2)

David Barry le 17 Mai 2013
I suggest you reciprocate your a variable and round it to the nearest integer. You then just need to make sure you get the arguments the correct way in the resample function.
y = resample(x,p,q) resamples the sequence in vector x at p/q times the original sampling rate
##### 5 commentairesAfficher 3 commentaires plus anciensMasquer 3 commentaires plus anciens
David Barry le 20 Mai 2013
I mean having P and Q values of 1 and 1.0010 is the same as having P and Q values of 1000 and 1001.
Kir le 25 Mai 2020
P and Q are integers

Connectez-vous pour commenter.

Malcolm Lidierth le 19 Mai 2013
Is this any help?
% SincResample returns the data convolved with a set of time-shifted windowed sinc functions, one for each of the samples [1..size(x,1)] in the input signal.
##### 0 commentairesAfficher -2 commentaires plus anciensMasquer -2 commentaires plus anciens

Connectez-vous pour commenter.

### Catégories

En savoir plus sur Multirate Signal Processing dans Help Center et File Exchange

### Community Treasure Hunt

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

Start Hunting!

Translated by