I am trying to do a complex 1-D CWT but the wave name cmor1-1.5 is not being accepted and the error message says invalid wavename. However, that is one of the possible choices. I don't understand. If anyone has seen and overcome this problem can you please help ? Thanks

3 Kommentare

Honglei Chen
Honglei Chen am 2 Okt. 2012
Hi Kim, could you post the part of your code that generates the error? thanks.
Kim
Kim am 2 Okt. 2012
Yes, thanks it is scales=(30:2:128); wname = 'cmor1-1.5'; figure c = cwt(m1,scales,'wname','plot');
I just tried actually typing in cmor1-1.5 instead of using wname and it worked, but it would be handy to not have to go through all the code to change the wname THanks
Honglei Chen
Honglei Chen am 2 Okt. 2012
Should just be
c = cwt(m1,scales,wname,'plot');
without the quote.

Melden Sie sich an, um zu kommentieren.

 Akzeptierte Antwort

Wayne King
Wayne King am 2 Okt. 2012

0 Stimmen

Hi Kim, How are you attempting to do this:
x = randn(1024,1);
wtcoeffs = cwt(x,1:32,'cmor1-1.5');
Should work, are you trying to use cwtft with that analyzing wavelet?

3 Kommentare

Kim
Kim am 2 Okt. 2012
Yes, but it will only accept it if I actually type in cmor1-1.5 instead of using the previously set wname Thanks
Honglei Chen
Honglei Chen am 2 Okt. 2012
Hi Kim, please see my comment on the top. Your wname already contains the name, no need to add quote. Otherwise, cwt thinks 'wname' is the name of the wavelet.
Wayne King
Wayne King am 2 Okt. 2012
What Honglei said is/was exactly the issue!

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Kategorien

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by