フィルターのクリア

How can i Resample?

16 ビュー (過去 30 日間)
Lisa Justin
Lisa Justin 2014 年 4 月 11 日
コメント済み: Lisa Justin 2014 年 4 月 11 日
I have two signals measured with different sampling frequencies
Signal 1 has a sampling frequency of 999.9917Hz while Signal 2 has a sampling frequency of 99.9976 Hz.
I would like to upsample signal 2 so that it has as many samples as signal 1.
who can i do this?

採用された回答

Youssef  Khmou
Youssef Khmou 2014 年 4 月 11 日
hi,
You can use the resample function, to get the idea clear here is an example :
Fs1= 999.9917;
Fs2= 99.9976;
t1=0:1/Fs1:0.5-1/Fs1; y1=sin(2*pi*t1*300);
t2=0:1/Fs2:0.5-1/Fs2; y2=sin(2*pi*t2*30);
The resampling function uses two integers p,q to resample y2 by p/q*Fs2 as the new rate, thus Fs1=p/q*Fs2.
[p,q]=rat(Fs1/Fs2);
y3=resample(y2,p,q);
  2 件のコメント
Youssef  Khmou
Youssef Khmou 2014 年 4 月 11 日
verfiy y2 and y3 using fft to notice enhancement in resolution.
Lisa Justin
Lisa Justin 2014 年 4 月 11 日
Thanks

サインインしてコメントする。

その他の回答 (1 件)

Azzi Abdelmalek
Azzi Abdelmalek 2014 年 4 月 11 日
Use interp1
  2 件のコメント
Lisa Justin
Lisa Justin 2014 年 4 月 11 日
thanks, but no it only zero pads the signal 2 to the length of signal 1. I would like to upsample because both signal was measured at the same time but at different sampling rates.
Azzi Abdelmalek
Azzi Abdelmalek 2014 年 4 月 11 日
編集済み: Azzi Abdelmalek 2014 年 4 月 11 日
Do you want to add zeros to your signal2?

サインインしてコメントする。

カテゴリ

Help Center および File ExchangeMultirate Signal Processing についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by