Continuos Wavelet Transform representation

3 views (last 30 days)
Hello there,
I've a couple of questions about the use of the CWT MATLAB function (cwt(,)) applied to a real time signal x. The questions are as follows:
1) If I'm filtering a signal (x) with a cut off frequency supposed to be equal to 5 Hz, by plotting cwt(x) I should see bright spots (high magntude) just for frequency lower than 5Hz rigth?
2) How can I reduce the frequency range on the ylabel? I mean, once I input the signal and the sampling frequency of the signal, a certain range of frequencies is automatically given on ylabel. Can I modify it? How? For example, in case of point 1) I have a signal that, once filtered, has significant component around 5Hz, therefore I'm not interested in information up to 200 Hz.
3) In the case I would like to plot the difference between the cw coefficients obtained from to signals, resepctively x1 and x2, how can I do? Which is the best way to do it? I know how to compute the coefficients and plot the two distinct cases but I don't know how to plot the module of the coefficient difference. Which is the function I should use?
Thank you very much in advance.

Accepted Answer

Kaashyap Pappu
Kaashyap Pappu on 24 Dec 2019
  1. Yes, that is what we would expect. A factor that can affect this is the stopband attenuation of the filter in question. The larger the attenuation, the brighter the required spots will be.
  2. A signal sampled at a specific frequency or sample rate will sample all frequency components as per Nyquist’s theorem. After filtering, the contribution of each component beyond the cutoff reduces but is not eliminated. If this information is irrelevant, decimate the sequence to the a suitable sample rate. The FFT length is related to original sequence length, so this should serve as an effective workaround.
  3. If you want a plot similar to the CWT plot, you can store the difference in a variable and plot it using imagesc. If you want a linear plot, you will have a line for each frequency-domain sample point. You can plot each row of the difference individually for clarity.
Hope this helps!
  1 Comment
Lorenzo Bernardini
Lorenzo Bernardini on 16 Jan 2020
Thanks for the answers, my question is: how can I change the scales in cwt? Moreover, how can I plot just the scalogram and not the scalogram and the analysed signal over the scalogram itself?
For instance I need frequencies going from 0 to 20 Hz.. How can I do it?
Thanks again for your precios help!

Sign in to comment.

More Answers (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!