Wavelet Toolbox Previous page   Next Page
leaves

Determine terminal nodes

Syntax

[N,K] = leaves(T,'sortdp')

Description

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

The nodes are ordered from left to right as in tree T.

[N,K] = leaves(T,'s') or [N,K] = leaves(T,'sort') returns sorted indices.
M = N(K) are the indices reordered as in tree T, from left to right.

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

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

[N,K] = leaves(T,'sortdp') or [N,K] = leaves(T,'sdp') returns sorted nodes.

Examples

See Also

tnodes, noleaves


Previous page  laurpoly liftfilt Next page

© 1994-2005 The MathWorks, Inc.