How to reconstruct a signal from it's Wavelet transform using Mexican Hat wavelet

조회 수: 14 (최근 30일)
I have a signal X and I apply a Mexican hat wavelet transform
coefs=cwt(X,0.001:100,'mexh');
Now I want to reconstruct the original signal X but when I try to use the Inverse wavelet transform I can't use the Mexican hat wavelet and the reconstruction is not good enough.
xrec=icwt(coefs,'mexh');
This code throws me the error:
Error using icwt>parseinputs (line 447)
Expected WAVNAME to match one of these values:
'morse', 'bump', 'amor'
The input, 'mexh', did not match any of the valid values.
Error in icwt (line 198)
params = parseinputs(Na,N,sigtype,varargin{:});
Why I cant use the Mexican hat wavelet in the inverse wavelet transform?

채택된 답변

Wayne King
Wayne King 2019년 9월 20일
This is not a bug. When you make the call:
coefs=cwt(X,0.001:100,'mexh');
You are calling the legacy CWT() interface which is officially not recommended. See
At the top of the page, we have a link to the old CWT api, which is now officially not recommended for use. For compatibility reasons, we have written the new API so that customers using the legacy interface are not broken.
However, the ICWT interface is only in support of the new CWT api. We have no inverse CWT API for use with the legacy CWT function.
Hope that helps,
Wayne
  댓글 수: 1
Santiago Marin
Santiago Marin 2019년 9월 20일
Ahh ok this makes it more clear, the thing is I have to reconstruct the signal from the decompossition made with the mexican hat for academic purposses but I was really lost since I couldn't find the 'mexh' parameter inside the cwt source code so I really didn't understand why it was working, thanks.

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Continuous Wavelet Transforms에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by