MATLAB: Does the WAVEDEC function error out for a custom wavelet of Type 4 in Wavelet Toolbox 4.2 (R2008a)

addnewwavedec2Wavelet Toolboxwaverec2

I have created a custom wavelet of Type 4 (without scaling function). I am able to view the wavelet via WAVEMENU with "Wavelet Display". However, when I use this wavelet with the WAVEDEC function, I receive the following error message:
************************************************
ERROR ...
------------------------------------------------
wfilters ---> The wavelet rtf08 is not valid!
************************************************
??? Error using ==> wfilters at 97
Invalid argument value.
Error in ==> wavedec at 33
[Lo_D,Hi_D] = wfilters(IN3,'d');
The reproduction steps are provided below:
% Add the custom wavelet family to the toolbox
wavemngr('add','rtf08ecg2','rtf08',4,'','rtf08ecg2',[1,2])
% Load the signal
load('cleanRatECG.mat')
% Perform wavelet decomposition
[c,l] = wavedec(ecg,1,'rtf08');

Best Answer

This change has been incorporated into the documentation in Release 2009b (R2009b). For previous releases, read below for any additional information:
The issue occurs because WFILTERS function (which is called by WAVEDEC) supports only orthogonal or bi-orthogonal wavelets. Theoretically, wavelet decomposition is not valid for wavelets which are not orthogonal or bi-orthogonal.
The information found in the following help documentation can be helpful:
"Wavelet Toolbox" -> "Advanced Concepts" -> "Wavelet Families: Additional Discussion" -> "Summary of Wavelet Families and Associated Properties"
Also note that, wavelet of types 1 (orthogonal) and 2 (bi-orthogonal) can be used to make DWT, CWT, Wavelet Packets, etc and they are compatible with WAVEDEC, WAVEREC, WFILTERS, etc. But, to be able to use these types, the needed filters must be built before.
Wavelet of type 3 is special as it includes only the Meyer wavelet.
Wavelet of type 4 has no scaling function and can be used by CWT.
Wavelet of type 5 has no scaling function and can be used by complex CWT.
Related Question