Wavelet Toolbox | ![]() ![]() |
Continuous Analysis Using the Command Line
This example involves a noisy sinusoidal signal.
You now have the signal noissin
in your workspace:
whos
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Performing a Continuous Wavelet Transform.
cwt
command. Type:
c = cwt(noissin,1:48,'db4');
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 48-by-1000 matrix with each
row corresponding to a single scale.
The cwt
command accepts a fourth argument. This is a flag that, when present, causes cwt
to produce a plot of the absolute values of the continuous wavelet transform coefficients.
The cwt
command can accept more arguments to define the different characteristics of the produced plot. For more information, see the cwt
reference page.
A plot appears.
Of course, coefficient plots generated from the command line can be manipulated using ordinary MATLAB graphics commands.
Choosing Scales for the Analysis.
The second argument to cwt gives you fine control over the scale levels on which the continuous analysis is performed. In the previous example, we used all scales from 1 to 48, but you can construct any scale vector subject to these constraints:
c = cwt(noissin,2:2:128,'db4','plot');
A new plot appears:
This plot gives a clearer picture of what's happening with the signal, highlighting the periodicity.
![]() | One-Dimensional Continuous Wavelet Analysis | Continuous Analysis Using the Graphical Interface | ![]() |