Wavelet Toolbox™ Previous page   Next Page 
cwt
 Provide feedback about this page

Real or complex continuous 1-D wavelet coefficient

Syntax

Description

cwt is a one-dimensional wavelet analysis function.

COEFS = cwt(S,SCALES,'wname') computes the continuous wavelet coefficients of the vector S at real, positive SCALES, using the wavelet whose name is 'wname' (see waveinfo for more information).

The signal S is real, the wavelet can be real or complex.

COEFS = cwt(S,SCALES,'wname','plot') computes and, in addition, plots the continuous wavelet transform coefficients.

COEFS = cwt(S,SCALES,'wname',PLOTMODE) computes and plots the continuous wavelet transform coefficients.

Coefficients are colored using PLOTMODE. Valid values for the string PLOTMODE are listed in the table below.

PLOTMODE
Description
'lvl'
Coloration made scale-by-scale
'glb'
Coloration made considering all scales
'abslvl' or 'lvlabs'
Coloration made scale-by-scale using the absolute values of the coefficients
'absglb' or 'glbabs'
Coloration made considering all scales using the absolute values of the coefficients

COEFS = cwt(...,'plot') is equivalent to COEFS = cwt(...,'absglb').

COEFS = cwt(S,SCALES,'wname',PLOTMODE,XLIM) computes and plots the continuous wavelet transform coefficients. Coefficients are colored using PLOTMODE and XLIM, where XLIM is a vector, [x1 x2], with 1 x1 < x2 length(S)

Let s be the signal and psi the wavelet. The wavelet coefficient of s at scale a and position b is defined by

Since s(t) is a discrete signal, we use a piecewise constant interpolation of the s(k) values, k = 1 to length(s).

COEFS = cwt(...,'scal')
[COEFS,SC] = cwt(...,'scal')
COEFS = cwt(...,'scalCNT')
[COEFS,SC] = cwt(...,'scalCNT') computes the continuous wavelet transform coefficients and the corresponding scalogram which represents the percentage of energy for each coefficient. When PLOTMODE is equal to 'scal', a scaled image of the scalogram is displayed, or when PLOTMODE is equal to 'scalCNT', a contour representation of the scalogram is displayed.

For each given scale a within the vector SCALES, the wavelet coefficients Ca,b are computed for b = 1 to ls = length(s), and are stored in COEFS(i,:) if a = SCALES(i).

Output argument COEFS is an la-by-ls matrix, where la is the length of SCALES. COEFS is a real or complex matrix, depending on the wavelet type.

Examples of valid uses are as follows:

Examples

This example demonstrates the difference between discrete and continuous wavelet transforms.

Algorithm

if s(t) = s(k), for then

So at any scale a, the wavelet coefficients Ca,b for b = 1 to length(s) can be obtained by convolving the signal s and a dilated and translated version of the integrals of the form

(given by intwave), and taking the finite difference using diff.

See Also
cwtext, wavedec, wavefun, waveinfo, wcodemat


 Provide feedback about this page 

Previous page coifwavf cwtext Next page

 © 1984-2008- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS