# Regarding Continuous Wavelet Transform of signal to remove time-localized frequencies

5 views (last 30 days)
BenL on 31 Mar 2017
Answered: BenL on 31 Mar 2017
Hi all. I have a strange issue when attempting to use the cwt() function on my array. I have tried this on R2012b and R2014b, both resulted in the error. My wavelet toolbox is: Wavelet Toolbox Version 4.10 R2012b
Essentially I am trying to remove time-localized frequencies from my input signal ( data : N x 1 array) and to reconstruct the resulting time series signal with desired frequencies removed. Each record has a corresponding time ( time : N x 1 array) represented as fractions of a day. From my analysis using spectral densities, I know that there are 2 predominant frequencies with period 25 days and 12.5 days. I am trying to remove these using the wavelet transform method (i.e. Morlet method).
Thus, I ran this command:
Ts = 0.042; % Sampling interval = hourly = (1/24) day
fs = 1/Ts; % Frequency
cwt(data,fs); % I believe the period can be specified directly, but am unsure how this can be done
It says:
Error using cwt (line 68)
Not enough input arguments.
Is there something I am doing wrong? Also, I need to generate the time vs. period plot for visualization purposes (e.g. time vs period )
I'd greatly appreciate any advice given. Still learning frequency-domain analyses!
Regards Ben

BenL on 31 Mar 2017
Ok, I tried with R2017a and cwt() worked. I have another question though.
I used this:
cwt(data,hours(1),'morse'); % The sampling interval is 1 hour
However, the axes are weird. The horizontal axis was fine (hours). For the vertical axis y-values themselves, i understand the graph is scaled by pow2(). The values where the magnitudes are high correspond to what I expect (i.e. around 25 and 12.5), but these are supposed to be in days, whereas the plot axis is in hours. How can I convert to the proper units with days in both axes? I suspect my definition of
duration() (i.e. hours(1))
is erroneous.