Main Content

Continuous Wavelet Analysis of Cusp Signal

This example shows how to perform continuous wavelet analysis of a cusp signal. You can use cwt for analysis using an analytic wavelet and wtmm to isolate and characterized singularities.

Load and plot a cusp signal. Display its definition at the command line.

load cuspamax; 
plot(cuspamax); grid on;

Figure contains an axes object. The axes object contains an object of type line.

x = linspace(0,1,1024); y = exp(-128*((x-0.3).^2))-3*(abs(x-0.7).^0.4);

Obtain and view the CWT of the cusp signal. The CWT uses an analytic Morse wavelet with gamma equal to 2 and a time-bandwidth parameter of 2.5. Notice the narrow region in the scalogram converging to the finest scale (highest frequency). This indicates a discontinuity in the signal.

cwt(cuspamax,'WaveletParameters',[2 2.5]);

Figure contains an axes object. The axes object with title Magnitude Scalogram, xlabel Time (Samples), ylabel Normalized Frequency (cycles/sample) contains 3 objects of type image, line, area.

Obtain a plot of the wavelet maxima lines using wavelet transform modulus maxima. wtmm returns estimates of the Holder exponents, which characterize isolated singularities in a signal. Notice that the cusp is shown very clearly using wtmm.


Figure contains an axes object and an object of type uitable. The axes object with title Wavelet Transform Maxima Lines, xlabel Sample, ylabel log2(scale) contains 7 objects of type image, line.