decimate shifts frequency
古いコメントを表示
I used decimate.m in order to down sample my data and applied it to wavelet to see time-frequency map.
ex)
downdata = decimate(data,2,500,'FIR') or decimate(data,2)
waveletdata = cwt(downdata,scale);
When I compare it with original data, I realized the frequency was shifted.
Are there any way to fix it?
Thanks
2 件のコメント
Walter Roberson
2012 年 6 月 15 日
Was it the phase that was shifted? I am not clear on what it would mean for the frequency to be shifted.
scally12
2012 年 6 月 15 日
採用された回答
その他の回答 (2 件)
Wayne King
2012 年 6 月 15 日
Here is an example:
Fs = 1e4;
t = 0:1/Fs:1-1/Fs;
x = cos(2*pi*500*t).*(t<0.5)+cos(2*pi*1000*t).*(t>=0.5);
scales1 = 1:0.25:30;
cfs1 = cwt(x,scales1,'morl');
freq1 = scal2frq(scales1,'morl',1/Fs);
surf(t,freq1,abs(cfs1),'edgecolor','none');
view(0,90);
Now decimate by 2.
y = decimate(x,2,500,'fir');
Fsnew = Fs/2;
scales2 = 1:0.01:15;
cfs2 = cwt(y,scales2,'morl');
freq2 = scal2frq(scales2,'morl',1/Fsnew);
tnew = 0:1/Fsnew:1-(1/Fsnew);
surf(tnew,freq2,abs(cfs2),'edgecolor','none');
view(0,90)
カテゴリ
ヘルプ センター および File Exchange で Continuous Wavelet Transforms についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!