compute the discrete wavelet transform of data - Maple Help

Online Help

All Products    Maple    MapleSim


Home : Support : Online Help : Mathematics : Discrete Mathematics : DiscreteTransforms : DiscreteTransforms/DiscreteWaveletTransform

DiscreteTransforms[DiscreteWaveletTransform] - compute the discrete wavelet transform of data

Calling Sequence

DiscreteWaveletTransform(A, w1, w2)

DiscreteWaveletTransform(A, w1, w2, options)

DiscreteWaveletTransform(A, Wavelet, WaveletParams, options)

DiscreteWaveletTransform(n, A, dim, w1, A1, A2, options)

DiscreteWaveletTransform(n, m, A, dim, w1, A1, A2, options)

DiscreteWaveletTransform(n, A, dim, Wavelet, WaveletParams, A1, A2, options)

DiscreteWaveletTransform(n, m, A, dim, Wavelet, WaveletParams, A1, A2, options)

Parameters

A

-

Vector, Matrix, or Array of datatype=float[8]; the data to be transformed

w1, w2

-

Vectors of datatype=float[8] of the same length; the high and low pass filters

Wavelet

-

string or name; the name of a supported wavelet family

WaveletParams

-

positive integer or list of two positive integers; the parameters to the family Wavelet

n

-

(optional) positive integer; the number of data points to be transformed

dim

-

(optional) integer; the dimension to be transformed in A, if A has more than one dimension

A1, A2

-

(optional) Vector, Matrix, or Array of datatype=float[8]; outputs in which to store the transformed data

m

-

(optional) positive integer; the number of transforms to be done

options

-

(optional) equation(s) of the form keyword = value, where keyword is endconditions or storagetype

Description

• 

The DiscreteWaveletTransform command performs the discrete wavelet transform on the signal A. If A1 and A2 (or just A1 when storagetype=singlearray) are provided, the transformed data is stored in them and they are returned. Otherwise, A1 and A2 are created before they are returned.

• 

If A1 and A2 are not provided, they are created to be of the same type, and have the same options, as A.  

• 

If provided, Wavelet and WaveletParams must be supported by WaveletCoefficients.

• 

If Wavelet is an orthogonal family, then

  

DiscreteWaveletTransform(A, Wavelet, WaveletParams)

  

is equivalent to

  

DiscreteWaveletTransform(A, WaveletCoefficients(Wavelet,WaveletParams))

• 

If Wavelet is a biorthogonal family, then

  

DiscreteWaveletTransform(A, Wavelet, WaveletParams)

  

is equivalent to

  

DiscreteWaveletTransform(A, op(1..2,[WaveletCoefficients(Wavelet,op(WaveletParams))]))

• 

DiscreteWaveletTransform will only transform data of even length, so if n is provided, it must be even; if n is not provided, then A must have an even size in dimension dim.

• 

m can only be specified if n is also provided and A has dimension 2. In this case, only m rows or columns (depending on which dimension is being transformed) are transformed, instead of all of them.

• 

If A has more than one dimension, dim must be provided.

• 

Note: Currently, only Arrays of 1 or 2 dimensions can be transformed.  

Examples

withDiscreteTransforms

DiscreteWaveletTransform,FourierTransform,InverseDiscreteWaveletTransform,InverseFourierTransform,WaveletCoefficients,WaveletPlot

(1)

Here are some small transforms using an artificial filter, to make clear the different options.

w1:=Vector1,0,0,datatype=float8

w1:=1.0.0.

(2)

w2:=Vector0,0,1,datatype=float8

w2:=0.0.1.

(3)

A:=Vector6,i→i,datatype=float8

A:=1.2.3.4.5.6.

(4)

DiscreteWaveletTransformA,w1,w2

1.3.5.,3.5.1.

(5)

DiscreteWaveletTransformA,w1,w2,endconditions=zeros

1.3.5.,3.5.0.

(6)

DiscreteWaveletTransformA,w1,w2,endconditions=reflection

1.3.5.,3.5.5.

(7)

DiscreteWaveletTransformA,w1,w2,storagetype=nodownsample

1.2.3.4.5.6.,3.4.5.6.1.2.

(8)

DiscreteWaveletTransformA,w1,w2,storagetype=singlearray

1.3.5.3.5.1.

(9)

Inversion is not always possible with orthogonal or biorthogonal data. This is illustrated below.

Digits:=20:

w1,w2:=WaveletCoefficientsDaubechies,4:

Aprime:=VectorA:

Aprime1:=A11

Aprime1:=0.

(10)

Aprime2:=A2+1w11w12:

Aprime

0.2.577350269189625733.4.5.6.

(11)

A1:=Vector3,datatype=float8:

A2:=Vector3,datatype=float8:

A1prime:=Vector3,datatype=float8:

A2prime:=Vector3,datatype=float8:

DiscreteWaveletTransformA,Daubechies,4,A1,A2,endconditions=zeros:

DiscreteWaveletTransformAprime,Daubechies,4,A1prime,A2prime,endconditions=zeros:

A1A1prime

0.0.0.

(12)

A2A2prime

0.0.0.

(13)

DiscreteWaveletTransformA,Daubechies,4,A1,A2,endconditions=reflection:

DiscreteWaveletTransformAprime,Daubechies,4,A1prime,A2prime,endconditions=reflection:

A1A1prime

0.0.0.

(14)

A2A2prime

0.0.0.

(15)

See InverseDiscreteWaveletTransform for an example using n and m.

See Also

InverseDiscreteWaveletTransform, SignalProcessing[DWT], Wavelet Examples and Applications, WaveletCoefficients, WaveletPlot, Wavelets


Download Help Document

Was this information helpful?



Please add your Comment (Optional)
E-mail Address (Optional)
What is ? This question helps us to combat spam