decimate shifts frequency
Ältere Kommentare anzeigen
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 Kommentare
Walter Roberson
am 15 Jun. 2012
Was it the phase that was shifted? I am not clear on what it would mean for the frequency to be shifted.
scally12
am 15 Jun. 2012
Akzeptierte Antwort
Weitere Antworten (2)
Wayne King
am 15 Jun. 2012
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)
scally12
am 15 Jun. 2012
0 Stimmen
Kategorien
Mehr zu Continuous Wavelet Transforms finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!