Wavelet Toolbox
  Go to function:
    Search    Help Desk 
maketree    Examples   See Also

Make tree.

Syntax

Description

maketree is a tree management utility.

maketree creates a tree of order ORD and depth D. ORD is an integer equal to the number of children of a generic node. Each nonterminal node has ORD children.

For wavelet packet decomposition, a convenient structure is a binary tree for the one-dimensional case (ORD = 2) and a quaternary tree for the two-dimensional case (ORD = 4). The depth D is the number of levels of the tree.

[T,NB] = maketree(ORD,D) creates a tree structure of order ORD with depth D. Output argument NB is the number of terminal nodes (NB = ORD^D). Output vector T is organized as:

[T(1) ... T(NB+1)] where T(i), i = 1, ..., NB are the indices of the terminal nodes and T(NB+1) = -ORD.

The nodes are numbered from left to right and from top to bottom. The root index is 0.

When used with three input arguments, [T,NB] = maketree(ORD,D,NBI) computes T as a (1+NBI)-by-(NB+1) matrix with T(1,:) as above and in the range T(2:NBI+1,:) the user is free to add their own material.

[T,NB] = maketree(ORD) is equivalent to [T,NB] = maketree(ORD,0,0). [T,NB] = maketree(ORD,D) is equivalent to [T,NB] = maketree(ORD,D,0).

Examples

See Also

plottree, wtreemgr

[ Previous | Help Desk | Next ]