Main Content

wptree

WPTREE constructor

    Description

    example

    T= wptree(order,depth,x,wname)returns a complete wavelet packet treeTof orderordercorresponding to a wavelet packet decomposition ofxat leveldepth, using Shannon entropy and the wavelet specified bywname.

    T = wptree(order,depth,x,wname)相当于T = wptree(order,depth,x,wname,'shannon').

    T= wptree(order,depth,x,wname,enttype,entpar)uses the entropy type specified byenttype.entparis an optional parameter depending on the value ofenttype.

    T= wptree(order,depth,x,wname,enttype,entpar,userdata)sets the userdata field ofT.

    Examples

    collapse all

    Create a 1-D signal.

    x = rand(1,512);

    Create the wavelet packet decomposition tree associated with the wavelet packet decomposition of the signal at level 3 using thedb3wavelet.

    t = wptree(2,3,x,"db3");

    Recompose the fourth and fifth nodes of the tree. Plot the result.

    t = wpjoin(t,[4;5]); plot(t)

    图包含2轴对象和其他对象of type uimenu. Axes object 1 with title Tree Decomposition contains 21 objects of type line, text. Axes object 2 with title data for node: 0 or (0,0). contains an object of type line.

    Click the node(3,0)to get this figure:

    node30.png

    Input Arguments

    collapse all

    Order of the tree, specified as2or4. The order of the tree is the number of children of each nonterminal node. Ifxis a vector (1-D signal), specify an order of2. Ifx是一个矩阵(image), specify an order of4.

    Data Types:double

    Level of wavelet packet decomposition, specified as a positive integer.

    Data Types:double

    Input data, specified as a vector (signal) or matrix (image).

    Data Types:double

    Wavelet name, specified as a character vector or string scalar. For more information, seewfilters.

    Data Types:string|char

    Entropy type, specified as a character vector or string scalar. For more information, seewentropy,wpdec, orwpdec2

    Data Types:string|char

    Optional parameter used for entropy computation. For more information, seewentropy,wpdec, orwpdec2.

    Data Types:double|string|char

    User data to set in theuserdatafield ofT, specified as an array, cell array, or structure array.

    Example:t = wptree(2,3,x,'db3','sure',0.5,{1,"aa",rand(3,3)})

    Output Arguments

    collapse all

    Wavelet packet tree, returned as aWPTREEobject.

    • Iforder = 2,Tis aWPTREEobject corresponding to a wavelet packet decomposition of the vector (signal)x, at leveldepthwith a particular waveletwname.

    • Iforder = 4,Tis aWPTREEobject corresponding to a wavelet packet decomposition of the matrix (image)x, at leveldepthwith a particular waveletwname.

    TheWPTREEobject has these fields:

    'dtree' DTREE parent object
    'wavInfo' Structure (wavelet information)
    'entInfo' Structure (entropy information)

    For more information on object fields, see thegetfunction or type

    help wptree/get

    The wavelet information structure,'wavInfo', contains

    'wavName' Wavelet name
    'Lo_D' Low Decomposition filter
    'Hi_D' High Decomposition filter
    'Lo_R' Low Reconstruction filter
    'Hi_R' High Reconstruction filter

    The entropy information structure,'entInfo', contains

    'entName' Entropy name
    'entPar' Entropy parameter

    Fields from the DTREE parent object:

    'allNI'

    All nodes information

    'allNI'is an array of sizenbnodeby5, which contains

    ind Index
    size Size of data
    ent Entropy
    ento Optimal entropy

    Each line is built based on this scheme:

    Version History

    Introduced before R2006a

    See Also

    |