Wavelet Toolbox™ Previous page   Next Page 
tnodes
 Provide feedback about this page

Determine terminal nodes

Syntax

Description

tnodes is a tree-management utility.

N = tnodes(T) returns the indices of terminal nodes of the tree T. N is a column vector.

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

N = tnodes(T,'deppos') returns a matrix N, which contains the depths and positions of terminal nodes.

N(i,1) is the depth of the i-th terminal node. N(i,2) is the position of the i-th terminal node.

For [N,K] = tnodes(T) or [N,K] = tnodes(T,'deppos'), M = N(K) are the indices reordered as in tree T, from left to right.

Examples

See Also

leaves, noleaves, wtreemgr


 Provide feedback about this page 

Previous page thselect treedpth Next page

 © 1984-2008- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS