Documentation |
This section takes you through the features of complex continuous wavelet analysis using the Wavelet Toolbox™ software and focuses on the differences between the real and complex continuous analysis.
You can refer to the section Command Line Continuous Wavelet Analysis if you want to learn how to
Zoom in on detail
Display coefficients in normal or absolute mode
Choose the scales at which the analysis is performed
Switch from scale to pseudo-frequency information
Exchange signal and coefficient information between the disk and the graphical tools
Wavelet Toolbox software requires only one function for complex continuous wavelet analysis of a real valued signal: cwt. You'll find full information about this function in its reference page.
In this section, you'll learn how to
Load a signal
Perform a complex continuous wavelet transform of a signal
Produce plots of the coefficients
Since you can perform analyses either from the command line or using the graphical interface tools, this section has subsections covering each method.
This example involves a cusp signal.
From the MATLAB^{®} prompt, type
load cuspamax;
You now have the signal cuspamax in your workspace:
whos
Name | Size | Bytes | Class |
---|---|---|---|
caption | 1x71 | 142 | char array |
cuspamax | 1x1024 | 8192 | double array |
caption caption = x = linspace(0,1,1024); y = exp(-128*((x-0.3).^2))-3*(abs(x-0.7).^0.4);
caption is a string that contains the signal definition.
Perform a Continuous Wavelet Transform.
Use the cwt command. Type
c = cwt(cuspamax,1:2:64,'cgau4');
The arguments to cwt specify the signal to be analyzed, the scales of the analysis, and the wavelet to be used. The returned argument c contains the coefficients at various scales. In this case, c is a complex 32-by-1024 matrix, each row of which corresponds to a single scale.
The cwt command accepts a fourth argument. This is a flag that, when present, causes cwt to produce four plots related to the complex continuous wavelet transform coefficients:
Real and imaginary parts
Modulus and angle
The cwt command can accept more arguments to define the different characteristics of the produced plots. For more information, see the cwt reference page.
Type
c = cwt(cuspamax,1:2:64,'cgau4','plot');
A plot appears:
Of course, coefficient plots generated from the command line can be manipulated using ordinary MATLAB graphics commands.
We now use the Complex Continuous Wavelet 1-D tool to analyze the same cusp signal we examined using the command line interface in the previous section.
Start the Complex Continuous Wavelet 1-D Tool.
From the MATLAB prompt, type
wavemenu
The Wavelet Toolbox Main Menu appears.
Click the Complex Continuous Wavelet 1-D menu item.
The continuous wavelet analysis tool for one-dimensional signal data appears.
Choose the File > Load Signal menu option.
When the Load Signal dialog box appears, select the MAT-file cuspamax.mat, which should reside in the MATLAB folder toolbox/wavelet/wavedemo. Click the OK button.
The cusp signal is loaded into the Complex Continuous Wavelet 1-D tool.
The default value for the sampling period is equal to 1 (second).
Perform a Complex Continuous Wavelet Transform
To start our analysis, let's perform an analysis using the cgau4 wavelet at scales 1 through 64 in steps of 2, just as we did using command-line functions in One-Dimensional Complex Continuous Wavelet Analysis.
In the upper-right portion of the Complex Continuous Wavelet 1-D tool, select the cgau4 wavelet and scales 1–64 in steps of 2.
Click the Analyze button.
After a pause for computation, the tool displays the usual plots associated to the modulus of the coefficients on the left side, and the angle of the coefficients on the right side.
Each side has exactly the same representation that we found in Continuous Analysis Using the Graphical Interface.
Select the plots related to the modulus of the coefficients using the Modulus option button in the Selected Axes frame.
The figure now looks like the one in the real Continuous Wavelet 1-D tool.
To know how to import and export information from the Complex Continuous Wavelet Graphical Interface, see the corresponding paragraph in Command Line Continuous Wavelet Analysis.
The only difference is that the variable coefs is a complex matrix (see Saving Wavelet Coefficients).