Converting code from old CWT to new CWT
Show older comments
I am trying to understand and re-implement an algorithm using someone else's code, which uses the old cwt function. Here is the portion of code in question:
fb = 13.5;
fc = 0.5;
scale = 3.7;
output = cwt(signal,scale,['cmor' num2str(fb) '-' num2str(fc)]);
The variable signal is time series data at 100Hz. The goal of this is to return the scale parameters of a bandpassed version of the signal at approximately 10-16Hz.
Here are my questions:
- Is this actually getting the proper bandpass range? Presumably this is using scale parameter. However, Fb and Fc seem mislabeled in this code and seem redudant to the scale parameter.
- How can I properly implement this using the new CWT functions? That is, given a fixed center frequency, bandwidth, and sampling frequency what is the best way to implement the appropriate single-wavelet transformation using a complex morlet wavelet using the new framework?
Thanks!
Answers (1)
Prabhan Purwar
on 28 Mar 2020
Edited: Prabhan Purwar
on 28 Mar 2020
0 votes
Hi,
Variables fb and fc represents properties of the Morse Wavelet used to determine the Continuous Wavelet Transform (CWT) of the signal.
- https://in.mathworks.com/help/wavelet/ug/morse-wavelets.html (Morse Wavelet)
Following link illustrates the use of filterbank in cwt
- https://in.mathworks.com/help/wavelet/ref/cwtfilterbank.html#mw_86022842-b2f0-483f-a87f-3630265b0e5a (filterbank using new version of cwt)
To verify your results take help of Magnitude Scalogram (as illustrated in the above example)
For further insights refer to the following links:
- https://in.mathworks.com/help/wavelet/ug/wavelet-families-additional-discussion.html (Wavelet Families)
- https://in.mathworks.com/help/wavelet/ref/cwt.html (cwt)
- https://in.mathworks.com/help/wavelet/ref/cwtold.html (old cwt)
Categories
Find more on Continuous Wavelet Transforms in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!