Adding custom wavelet to modwt

3 次查看(过去 30 天)
Fred Severgnini
Fred Severgnini 2023-6-29
回答: Balaji 2023-8-23
Hello,
I am trying to work with a custom wavelet, which I call "qrs". Following the code example from wavemngr, I creates a .m file containin my wavelet, and added it to the system doing the following:
wavemngr('add','QRScomplex','qrs',1,'1 2 3 4 5','qrswavf')
I can tell the wavelet works because I can see it listed using
wavemngr('read')
Additionally, when I open the waveletAnalyzer I can use it in the "Wavelet 1D" option.
However, when I try to call my wavelet with modwt I get an error:
wt = modwt(signal, 'qre', 2);
Does anyone know why this is happening and how it can be fixed?
Here's the error message:
Error using wavemngr
Invalid wavelet name: qrs.
Error in wavemngr (line 339)
case 'wn' , i_fam = wavemngr('indw',arg);
Error in wfilters (line 63)
[wtype,fname] = wavemngr('fields',wname,'type','file');
Error in modwt (line 176)
[~,~,Lo,Hi] = wfilters(params.wname);
Error in get_wavelet_transform (line 17)
wt = modwt(signal, wavelet, level);

回答(1 个)

Balaji
Balaji 2023-8-23
Hi Fred,
As per my understanding, you’re facing issues while trying to use the custom wavelet created using the “wavemngr” function.
The code for the custom wavelet is in the “qrswavf.m” file that you have created, therefore the input argument of “qrswavf” as you have determined should be the argument you should be passing to the “modwt” function.
If you are following the example code given in the documentation of “wavemngr”, you can modify your code, provided you have changed only the name of the variable, as follows:
wt = modwt(signal, 'qrs2');
You can refer to the documentation of “wavemngr” below:
https://in.mathworks.com/help/wavelet/ref/wavemngr.html
provide required documentation links as support. [SM1]

类别

Help CenterFile Exchange 中查找有关 Continuous Wavelet Transforms 的更多信息

产品


版本

R2023a

Community Treasure Hunt

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

Start Hunting!

Translated by