bswfun

Biorthogonal scaling and wavelet functions

Syntax

``[phis,psis,phia,psia,xval] = bswfun(lod,hid,lor,hir)``
``[___] = bswfun(___,iter)``
``[___] = bswfun(___,"plot")``

Description

````[phis,psis,phia,psia,xval] = bswfun(lod,hid,lor,hir)` returns approximations on the grid `xval` of the two pairs of biorthogonal scaling and wavelet functions (`lod,hid`) and (`lor,hir`), using the two pairs of filters (`lod,hid`) and (`lor,hir`).```
````[___] = bswfun(___,iter)` computes the two pairs of scaling and wavelet functions using `iter` iterations.```

example

````[___] = bswfun(___,"plot")` also plots the functions.`bswfun(lod,hid,lor,hir,"plot",iter)` is equivalent to `bswfun(lod,hid,lor,hir,iter,"plot")`.```

Examples

collapse all

This example shows how to obtain the biorthogonal scaling and wavelet functions corresponding to a lifting scheme. Obtain the lifting scheme for the CDF 3/1 wavelet.

`lscdf = liftingScheme(Wavelet="cdf3.1");`

Display the lifting scheme.

`disp(lscdf)`
``` Wavelet : 'cdf3.1' LiftingSteps : [3 × 1] liftingStep NormalizationFactors : [2.1213 0.4714] CustomLowpassFilter : [ ] Details of LiftingSteps : Type: 'update' Coefficients: -0.3333 MaxOrder: -1 Type: 'predict' Coefficients: [-0.3750 -1.1250] MaxOrder: 1 Type: 'update' Coefficients: 0.4444 MaxOrder: 0 ```

Obtain the decomposition and reconstruction filters from the lifting scheme.

`[LoD,HiD,LoR,HiR] = ls2filt(lscdf);`

Visualize the scaling and wavelet function and their duals.

`bswfun(LoD,HiD,LoR,HiR,"plot");`

Input Arguments

collapse all

Decomposition filters, specified as a pair of vectors. `lod` is the lowpass decomposition filter, and `hid` is the highpass decomposition filter.

Data Types: `double`

Reconstruction filters, specified as a pair of vectors. `lor` is the lowpass reconstruction filter, and `hir` is the highpass reconstruction filter.

Data Types: `double`

Number of iterations used to generate the wavelet and scaling functions, specified as a positive integer. Larger values of `iter` increase the refinement of the approximations.

Output Arguments

collapse all

Biorthogonal scaling and wavelet functions constructed from the decomposition filter pair (`lod,hid`), returned as vectors. `phis` is the approximation of the scaling function and `psis` is the approximation of the wavelet function.

Biorthogonal scaling and wavelet functions constructed from the reconstruction filter pair (`lor,hir`), returned as vectors. `phia` is the approximation of the scaling function and `psia` is the approximation of the wavelet function.

Grid points where the approximations are evaluated, returned as a vector.

Algorithms

This function uses the cascade algorithm.

Version History

Introduced before R2006a