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!