How to resample a signal by a fraction
이전 댓글 표시
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
채택된 답변
추가 답변 (2개)
David Barry
2013년 5월 17일
1 개 추천
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
David Barry
2013년 5월 17일
Apologies, I missed your 1+a bit. In that case you need to change both P and Q in the resample function by multiplying up until you get the accuracy you need.
Example: Suppose I want to re-sample by 1/(1+a) where a was 1e-3.
1+1e-3 = 1.0010 so I might want to scale up by factor of 1000 and use values of 1000 and 1001 for P and Q.
Saed
2013년 5월 19일
David Barry
2013년 5월 20일
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
2020년 5월 25일
P and Q are integers
Malcolm Lidierth
2013년 5월 19일
0 개 추천
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.
카테고리
도움말 센터 및 File Exchange에서 Multirate Signal Processing에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!