Wavelet Toolbox Previous page   Next Page
cwt

Continuous 1-D wavelet coefficients

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.

XLIM = [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).

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 a 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

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
wavedec, wavefun, waveinfo, wcodemat


Previous page  coifwavf dbaux Next page

© 1994-2005 The MathWorks, Inc.