Main Content

wavefun2

Wavelet and scaling functions 2-D

    Description

    [s,w1,w2,w3,xyval] = wavefun2(wname,iter) returns an approximation s of the 2-D scaling function and approximations w1, w2, and w3 of the three 2-D wavelet functions associated with the orthogonal wavelet wname. xyval is a 2-D grid of points. The positive integer iter specifies the number of iterations.

    The approximations are the tensor products of the one-dimensional scaling and wavelet functions associated with the orthogonal wavelet wname. For more information, see Algorithms.

    [s,w1,w2,w3,xyval] = wavefun2(wname,iter,'plot') also plots the functions.

    [___] = wavefun2(wname,a,b) returns the approximations using max(a,b) iterations. The wavefun2 function also plots the approximations.

    • wavefun2(wname,0) is equivalent to wavefun2(wname,4,0).

    • wavefun2(wname) is equivalent to wavefun2(wname,4).

    example

    Examples

    collapse all

    Specify an orthogonal wavelet.

    wav = "sym4";

    Obtain and plot the approximations of the 2-D scaling function and wavelets. Specify four iterations.

    iter = 4;
    [s,w1,w2,w3,xyval] = wavefun2(wav,iter,0);

    Figure contains 4 axes objects. Axes object 1 with title Scale function contains an object of type surface. Axes object 2 with title Wavelet function (1) contains an object of type surface. Axes object 3 with title Wavelet function (2) contains an object of type surface. Axes object 4 with title Wavelet function (3) contains an object of type surface.

    Obtain the wavelet approximation corresponding to the (ϕ,ψ) tensor product using one iteration. Compare with the first approximation.

    [~,w1x] = wavefun2(wav,1);
    tiledlayout(1,2)
    nexttile
    imagesc(w1)
    title("Four Iterations")
    nexttile
    imagesc(w1x)
    title("One Iteration")

    Figure contains 2 axes objects. Axes object 1 with title Four Iterations contains an object of type image. Axes object 2 with title One Iteration contains an object of type image.

    Input Arguments

    collapse all

    Orthogonal wavelet, specified as a character vector or string scalar. For a list of orthogonal wavelets, see wfilters.

    Data Types: char | string

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

    Data Types: double

    Iteration, specified as a pair of positive integers. The number of iterations is equal to max(a,b).

    Output Arguments

    collapse all

    2-D scaling function approximation, returned as a matrix. For more information, see Algorithms.

    2-D wavelet function approximations, returned as matrices. For more information, see Algorithms.

    Grid, returned as a matrix. For more information, see Algorithms.

    Algorithms

    The wavefun2 function returns approximations of the 2-D scaling function and the three 2-D wavelet functions resulting from the tensor products of the one-dimensional scaling and wavelet functions associated with the orthogonal wavelet wname.

    If [phi,psi,xval] = wavefun(wname,iter), then:

    • s is the tensor product of phi and phi.

    • w1, w2, and w are the tensor products (phi,psi), (psi,phi), and (psi,psi), respectively.

    • xyval is the tensor product (xval,xval).

    For more information, see wavefun.

    References

    [1] Daubechies, I. Ten Lectures on Wavelets. CBMS-NSF Regional Conference Series in Applied Mathematics. Philadelphia, PA: Society for Industrial and Applied Mathematics, 1992.

    [2] Strang, G., and T. Nguyen. Wavelets and Filter Banks. Wellesley, MA: Wellesley-Cambridge Press, 1996.

    Version History

    Introduced before R2006a