Difficulty using the CWT function
24 views (last 30 days)
Show older comments
Hi,
I'm getting a lot of this:
>> cwt(data,'bump',fs);
Undefined function 'sqrt' for input arguments of type 'char'.
Error in cwt (line 278) coefs(ind,:) = -sqrt(a)*wkeep1(diff(wconv1(ySIG,f)),lenSIG);
I'm also getting quite a bit of this:
Error using wavemngr (line 254) Invalid wavelet name: amor.
Error in wavemngr (line 354) i_fam = wavemngr('indw',varargin{1});
Error in intwave (line 74) wtype = wavemngr('type',wname);
Error in cwt (line 187) [val_WAV,xWAV] = intwave(WAV,precis);
I've tried all the wavelet names that I'm able to find in the docs but Morlet (amor/mor1) is what I'm after.
essentially, I just want to plot a time-frequency analysis using continuous wavelet transform. I'm fairly sure I'm using the syntax used in the help documentation but I can't get it to work.
What should I do?
Thanks
1 Comment
Nick Choi
on 4 Dec 2017
To use Morlet as a wavelet name, 'morl' should be used according to the following documentation page:
The following documentation page provides an example of how to perform time-frequency analysis using continuous wavelet transform:
If you are able to run the example, it would be helpful if you could provide the reproduction code and data files that were causing the original error messages.
Answers (3)
Nick Choi
on 5 Dec 2017
It seems as though the error messages are being generated because the new and old versions of the 'cwt' function are being called in various the code snippets.
Since the syntax differs between the two function versions, I would suggest going through your code to ensure that the syntax corresponds to the newer version of the function as described in the release notes:
This would help facilitate the debugging process.
0 Comments
See Also
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!