Wavelet Toolbox Previous page   Next Page

One-Dimensional Analysis Using the Command Line

This example involves a noisy Doppler test signal.

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

  1. Set the variables. Type
  1. For the SWT, if a decomposition at level k is needed, 2^k must divide evenly into the length of the signal. If your original signal does not have the correct length, you can use the Signal Extension GUI tool or the  wextend function to extend it.

  1. Perform a single-level Stationary Wavelet Decomposition.
  1. Perform a single-level decomposition of the signal using the db1 wavelet. Type

    This generates the coefficients of the level 1 approximation (swa) and detail (swd). Both are of the same length as the signal. Type

  1. Display the coefficients of approximation and detail.
  1. To display the coefficients of approximation and detail at level 1, type

  1. Regenerate the signal by Inverse Stationary Wavelet Transform.
  1. To find the inverse transform, type

    To check the perfect reconstruction, type

  1. Construct and display approximation and detail from the coefficients.
  1. To construct the level 1 approximation and detail (A1 and D1) from the coefficients swa and swd, type

    To display the approximation and detail at level 1, type

  1. Perform a multilevel Stationary Wavelet Decomposition.
  1. To perform a decomposition at level 3 of the signal (again using the db1 wavelet), type

    This generates the coefficients of the approximations at levels 1, 2, and 3 (swa) and the coefficients of the details (swd). Observe that the rows of swa and swd are the same length as the signal length. Type

Name
Size
Bytes
Class
noisdopp
1x1024
8192
double array
s
1x1024
8192
double array
swa
3x1024
24576
double array
swd
3x1024
24576
double array

  1. Display the coefficients of approximations and details.
  1. To display the coefficients of approximations and details, type

  1. Reconstruct approximation at Level 3 From coefficients.
  1. To reconstruct the approximation at level 3, type

  1. Reconstruct details from coefficients.
  1. To reconstruct the details at levels 1, 2 and 3, type

  1. Reconstruct and display approximations at Levels 1 and 2 from approximation at Level 3 and details at Levels 2 and 3.
  1. To reconstruct the approximations at levels 2 and 3, type

    To display the approximations and details at levels 1, 2 and 3, type

  1. Remove noise by thresholding.
  1. To de-noise the signal, use the ddencmp command to calculate a default global threshold. Use the wthresh command to perform the actual thresholding of the detail coefficients, and then use the iswt command to obtain the de-noised signal.

    To display both the original and de-noised signals, type

    The obtained signal remains a little bit noisy. The result can be improved by considering the decomposition of s at level 5 instead of level 3, and repeating steps 14 and 15. To improve the previous de-noising, type

    A second syntax can be used for the swt and iswt functions, giving the same results:

    You can obtain the same plot by using the same plot commands as in step 16 above.


Previous page  One-Dimensional Discrete Stationary Wavelet Analysis One-Dimensional Analysis for De-Noising Using the Graphical Interface Next page

© 1994-2005 The MathWorks, Inc.