Wavelet Toolbox Previous page   Next Page

Continuous Analysis Using the Command Line

This example involves a noisy sinusoidal signal.

  1. Load a signal.
  1. From the MATLAB prompt, type

    You now have the signal noissin in your workspace:

  1. Perform a Continuous Wavelet Transform.
  1. Use the cwt command. Type

    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.

  1. Plot the coefficients.
  1. 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.

  1. Choose scales for the analysis.
  1. 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:

    Let's repeat the analysis using every other scale from 2 to 128. Type

    A new plot appears:

    This plot gives a clearer picture of what's happening with the signal, highlighting the periodicity.


Previous page  One-Dimensional Continuous Wavelet Analysis Continuous Analysis Using the Graphical Interface Next page

© 1994-2005 The MathWorks, Inc.