MATLAB: Decimate shifts frequency

decimate

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

Best Answer

You have not shown us what your scale vector is for the cwt, but if you decimate the data, then you are changing the scale at which a given frequency occurs. So the energy in the CWT coefficients is going to shift in scale.
You should construct an appropriate scale vector for your "new" sampling rate and the expected frequencies in your input.
You can also use scal2frq to get an approximate frequency vector from your scale vector.