Main Content

wpsplt

Split (decompose) wavelet packet

    Description

    X = wpsplt(T,N) returns the wavelet packet tree X corresponding to the decomposition of the node N in the wavelet packet tree T.

    example

    [X,cA,cDe] = wpsplt(T,N) also returns the approximation and detail coefficients cA and cDe, respectively, of the node. For this syntax, T is a 1-D wavelet packet decomposition.

    [X,cA,cH,cV,cD] = wpsplt(T,N) also returns the horizontal, vertical and diagonal detail coefficients cH, cV, and cD, respectively, of the node. For this syntax, T is a 2-D wavelet packet decomposition.

    Examples

    collapse all

    Load a signal.

    load noisdopp

    Obtain the wavelet packet tree corresponding to the wavelet packet decomposition of the signal at level 3. Use the db1 wavelet. Plot the tree.

    wpt = wpdec(noisdopp,3,"db1");
    plot(wpt)

    Figure contains 2 axes objects and other objects of type uimenu. Axes object 1 with title Tree Decomposition contains 29 objects of type line, text. Axes object 2 with title data for node: 0 or (0,0). contains an object of type line.

    Decompose the tree node at depth-position (3,0). Plot the modified tree.

    wpt = wpsplt(wpt,[3 0]);
    plot(wpt)

    Figure contains 2 axes objects and other objects of type uimenu. Axes object 1 with title Tree Decomposition contains 33 objects of type line, text. Axes object 2 with title data for node: 0 or (0,0). contains an object of type line.

    Input Arguments

    collapse all

    Wavelet packet tree, specified as a wptree object. The tree corresponds to a one- or two-dimensional wavelet packet decomposition.

    Node in a wavelet packet tree, specified as a nonnegative integer, or pair of nonnegative integers. See depo2ind and ind2depo.

    Example: If wpt = wpdec(1:256,2,"sym4"), then wpsplt(wpt,3) and wpsplt(wpt,[2 0]) specify the same node.

    Output Arguments

    collapse all

    Wavelet packet tree, returned as a wptree object.

    Approximation coefficients of a node, returned as a vector or matrix. For a 1-D decomposition, cA is a vector. For a 2-D decomposition, cA is a matrix.

    Detail coefficients of a node in a 1-D wavelet packet decomposition, returned as a vector.

    Detail coefficients of a node in a 2-D wavelet packet decomposition, returned as matrices. cH, cV, and cD correspond to the horizontal, vertical, and diagonal details, respectively.

    Version History

    Introduced before R2006a