Main Content

wpcutree

Cut wavelet packet tree

    Description

    X = wpcutree(T,L) cuts the wavelet packet tree T at level L and returns the result.

    example

    [X,RN] = wpcutree(T,L) returns the indices RN of the reconstructed nodes.

    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.

    Cut the wavelet packet tree at level 2. Plot the result.

    nwpt = wpcutree(wpt,2);
    plot(nwpt)

    Figure contains 2 axes objects and other objects of type uimenu. Axes object 1 with title Tree Decomposition contains 13 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.

    Wavelet packet tree level, specified as a nonnegative integer.

    Output Arguments

    collapse all

    Wavelet packet tree, returned as a wptree object.

    Tree node indices, returned as a vector.

    Version History

    Introduced before R2006a

    See Also

    |