 WaveletCoefficients - Maple Help

DiscreteTransforms

 WaveletCoefficients
 compute common orthogonal and biorthogonal wavelet masks Calling Sequence WaveletCoefficients(Wavelet, WaveletParams, options) Parameters

 Wavelet - string or name; the name of a supported orthogonal wavelet family WaveletParams - parameters to the wavelet family Wavelet options - (optional) equation of the form guarddigits = integer Options

 • guarddigits can be any positive integer. Setting guarddigits=d means that all computations done to generate the wavelet will be done with Digits+d digits of precision. Answers are returned to Digits digits of precision.
 • The default value for guarddigits is 20 for all wavelets except Battle-Lemarie wavelets. See Wavelets for details. Description

 • If Wavelet is an orthogonal family, then WaveletCoefficients(Wavelet, WaveletParams) returns two Vectors, the high pass and low pass filters of the wavelet in the Wavelet family with parameters WaveletParams.
 • In this case, WaveletParams is usually a single positive integer, and often represents the size of the wavelet or the number of vanishing moments of the wavelet.
 • If Wavelet is a biorthogonal family, WaveletCoefficients(Wavelet, WaveletParams) returns four Vectors. The first two Vectors are the high pass and low pass analysis filters of the wavelet in the Wavelet family with parameters WaveletParams. The second two Vectors are the synthesis filters.
 • In this case, WaveletParams is usually a sequence of two numbers, which often represent the size of the wavelet or the number of vanishing moments of the wavelet.
 • The low pass filter is also known as the refinement or scaling coefficients, and the high pass filter is also known as the wavelet coefficients.
 • If Digits < evalhf(Digits), then all Vectors returned are of datatype=float. Otherwise, results are returned with Digits digits.
 • WaveletCoefficients references a database of stored wavelet coefficients and intermediate computations whenever possible. However, wavelets can be computed to arbitrary precision, by changing either Digits or guarddigits.
 • The supported orthogonal families are Daubechies, Symlet, Coiflet, and BattleLemarie.
 • The supported biorthogonal families are BiorthogonalSpline and CDF. CDF is a single wavelet, not a family.
 – See the Wavelets page for details on wavelet families and parameters.
 • All orthogonal wavelets are normalized to have (${L}_{2}$) norm 1. If w1 and w2 are the high and low pass filter of an orthogonal wavelet, then

 and

 are $1$ if k=0 (because w1 and w2 have norm 1) and $0$ if k is even but not $0$. Also,

 is $0$ for all even k. w1 and w2 are always of the same size.
 • w1 can be obtained by reversing w2 and negating every second element.
 • If w1a, w2a, w1s, and w2s are the high and low pass analysis and synthesis filters, then

 and

 are $1$ if k=0 and $0$ if k is even but not $0$. Also,

 and

 are $0$ for all even k.
 • If necessary, w1a, w2a, w1s, and w2s are padded with 0s to ensure they are all of the same length.
 • w1s can be obtained by reversing w2a and negating every second coefficient; likewise for w2s and w1a. Examples

 > $\mathrm{with}\left(\mathrm{DiscreteTransforms},\mathrm{WaveletCoefficients}\right)$
 $\left[{\mathrm{WaveletCoefficients}}\right]$ (1)
 > $\left[\mathrm{WaveletCoefficients}\left(\mathrm{Daubechies},2\right)\right]$
 $\left[\left[\begin{array}{c}{0.707106781186548}\\ {-0.707106781186548}\end{array}\right]{,}\left[\begin{array}{c}{0.707106781186548}\\ {0.707106781186548}\end{array}\right]\right]$ (2)

Note that the output is different from the commonly cited values [1,-1] and [1,1] because it has been normalized to have norm 1.

 > $\mathrm{w1},\mathrm{w2}≔\mathrm{WaveletCoefficients}\left("Symlet",4\right)$
 ${\mathrm{w1}}{,}{\mathrm{w2}}{≔}\left[\begin{array}{c}{-0.129409522551260}\\ {-0.224143868042013}\\ {0.836516303737808}\\ {-0.482962913144534}\end{array}\right]{,}\left[\begin{array}{c}{0.482962913144534}\\ {0.836516303737808}\\ {0.224143868042013}\\ {-0.129409522551260}\end{array}\right]$ (3)
 > $\left[\mathrm{seq}\left(\mathrm{add}\left({\mathrm{w1}}_{i}{\mathrm{w1}}_{i+2k},i=\mathrm{max}\left(1,1-2k\right)..\mathrm{min}\left(\mathrm{rtable_num_elems}\left(\mathrm{w1}\right),\mathrm{rtable_num_elems}\left(\mathrm{w1}\right)-2k\right)\right),k=-2..2\right)\right]$
 $\left[{0}{,}{1.38777878078145}{×}{{10}}^{{-17}}{,}{1.}{,}{1.38777878078145}{×}{{10}}^{{-17}}{,}{0}\right]$ (4)
 > $\left[\mathrm{seq}\left(\mathrm{add}\left({\mathrm{w2}}_{i}{\mathrm{w2}}_{i+2k},i=\mathrm{max}\left(1,1-2k\right)..\mathrm{min}\left(\mathrm{rtable_num_elems}\left(\mathrm{w2}\right),\mathrm{rtable_num_elems}\left(\mathrm{w2}\right)-2k\right)\right),k=-2..2\right)\right]$
 $\left[{0}{,}{1.38777878078145}{×}{{10}}^{{-17}}{,}{1.}{,}{1.38777878078145}{×}{{10}}^{{-17}}{,}{0}\right]$ (5)
 > $\left[\mathrm{seq}\left(\mathrm{add}\left({\mathrm{w1}}_{i}{\mathrm{w2}}_{i+2k},i=\mathrm{max}\left(1,1-2k\right)..\mathrm{min}\left(\mathrm{rtable_num_elems}\left(\mathrm{w2}\right),\mathrm{rtable_num_elems}\left(\mathrm{w2}\right)-2k\right)\right),k=-2..2\right)\right]$
 $\left[{0}{,}{0.}{,}{2.08166817117217}{×}{{10}}^{{-17}}{,}{0.}{,}{0}\right]$ (6)
 > $\mathrm{w1a},\mathrm{w2a},\mathrm{w1s},\mathrm{w2s}≔\mathrm{WaveletCoefficients}\left(\mathrm{BiorthogonalSpline},3,5\right):$
 > $\left[\mathrm{seq}\left(\mathrm{add}\left({\mathrm{w1a}}_{i}{\mathrm{w1s}}_{i+2k},i=\mathrm{max}\left(1,1-2k\right)..\mathrm{min}\left(\mathrm{rtable_num_elems}\left(\mathrm{w1a}\right),\mathrm{rtable_num_elems}\left(\mathrm{w1a}\right)-2k\right)\right),k=-6..6\right)\right]$
 $\left[{0}{,}{0.}{,}{0.}{,}{8.67361737988404}{×}{{10}}^{{-19}}{,}{-3.90312782094782}{×}{{10}}^{{-18}}{,}{2.77555756156289}{×}{{10}}^{{-17}}{,}{1.}{,}{2.77555756156289}{×}{{10}}^{{-17}}{,}{0.}{,}{8.67361737988404}{×}{{10}}^{{-19}}{,}{0.}{,}{0.}{,}{0}\right]$ (7)
 > $\left[\mathrm{seq}\left(\mathrm{add}\left({\mathrm{w2a}}_{i}{\mathrm{w2s}}_{i+2k},i=\mathrm{max}\left(1,1-2k\right)..\mathrm{min}\left(\mathrm{rtable_num_elems}\left(\mathrm{w2a}\right),\mathrm{rtable_num_elems}\left(\mathrm{w2a}\right)-2k\right)\right),k=-6..6\right)\right]$
 $\left[{0}{,}{0.}{,}{0.}{,}{8.67361737988404}{×}{{10}}^{{-19}}{,}{0.}{,}{2.77555756156289}{×}{{10}}^{{-17}}{,}{1.}{,}{2.77555756156289}{×}{{10}}^{{-17}}{,}{-3.90312782094782}{×}{{10}}^{{-18}}{,}{8.67361737988404}{×}{{10}}^{{-19}}{,}{0.}{,}{0.}{,}{0}\right]$ (8)
 > $\left[\mathrm{seq}\left(\mathrm{add}\left({\mathrm{w1s}}_{i}{\mathrm{w2a}}_{i+2k},i=\mathrm{max}\left(1,1-2k\right)..\mathrm{min}\left(\mathrm{rtable_num_elems}\left(\mathrm{w2a}\right),\mathrm{rtable_num_elems}\left(\mathrm{w2a}\right)-2k\right)\right),k=-6..6\right)\right]$
 $\left[{0}{,}{0.}{,}{0.}{,}{0.}{,}{0.}{,}{0.}{,}{-6.93889390390723}{×}{{10}}^{{-18}}{,}{0.}{,}{0.}{,}{0.}{,}{0.}{,}{0.}{,}{0}\right]$ (9)
 > $\left[\mathrm{seq}\left(\mathrm{add}\left({\mathrm{w2s}}_{i}{\mathrm{w1a}}_{i+2k},i=\mathrm{max}\left(1,1-2k\right)..\mathrm{min}\left(\mathrm{rtable_num_elems}\left(\mathrm{w2a}\right),\mathrm{rtable_num_elems}\left(\mathrm{w2a}\right)-2k\right)\right),k=-6..6\right)\right]$
 $\left[{0}{,}{0.}{,}{0.}{,}{1.73472347597681}{×}{{10}}^{{-18}}{,}{0.}{,}{0.}{,}{1.11212037842701}{×}{{10}}^{{-16}}{,}{0.}{,}{0.}{,}{1.73472347597681}{×}{{10}}^{{-18}}{,}{0.}{,}{0.}{,}{0}\right]$ (10)