This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English verison of the page.

Note: This page has been translated by MathWorks. Please click here
To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.


Order terminal nodes of binary wavelet packet tree


[Tn_Pal,Tn_Seq] = otnodes(WPT)
[Tn_Pal,Tn_Seq,I,J] = otnodes(WPT)
[DP_Pal,DP_Seq] = otnodes(WPT,'dp')


[Tn_Pal,Tn_Seq] = otnodes(WPT) returns the terminal nodes of the binary wavelet packet tree, WPT, in Paley (natural) ordering, Tn_Pal, and sequency (frequency) ordering, Tn_Seq. Tn_Pal and Tn_Seq are N-by-1 column vectors where N is the number of terminal nodes.

[Tn_Pal,Tn_Seq,I,J] = otnodes(WPT) returns the permutations of the terminal node indices such that Tn_Seq = Tn_Pal(I) and Tn_Pal = Tn_Seq(J).

[DP_Pal,DP_Seq] = otnodes(WPT,'dp') returns the Paley and frequency-ordered terminal nodes in node depth-position format. DP_Pal and DP_Seq are N-by-2 matrices. The first column contains the depth index, and the second column contains the position index.

Input Arguments


Binary wavelet packet tree. You can use treeord to determine the order of your wavelet packet tree.


Character vector indicating that the Paley-ordered or sequency-ordered nodes are returned in depth-position format.

Output Arguments


Terminal nodes in Paley (natural) ordering


Terminal nodes in sequency ordering


Paley-ordered terminal nodes in depth-position format. This output argument only applies when you use the 'dp' input argument.


Sequency-ordered terminal nodes in depth-position format. This output argument only applies when you use the 'dp' input argument.


Order terminal nodes with Paley and frequency ordering:

x = randn(8,1);
wpt = wpdec(x,2,'haar');
[Tn_Pal,Tn_Seq] = otnodes(wpt);
% Tn_Pal is [3 4 5 6]
% Tn_Seq is [3 4 6 5]

Return permutations for Paley and frequency ordering:

load noisdopp;
wpt = wpdec(noisdopp,6,'sym4');
[Tn_Pal,Tn_Seq,I,J] = otnodes(wpt);

Order terminal nodes by depth and position:

x = randn(8,1);
wpt = wpdec(x,2,'haar');
[DP_Pal,DP_Seq] = otnodes(wpt,'dp');

Order terminal nodes from a modified wavelet packet tree:

 t = wptree(2,2,rand(1,512),'haar');
 t = wpsplt(t,4);
 t = wpsplt(t,5);
 t = wpsplt(t,10);
 [tn_Pal,tn_Seq,I,J] = otnodes(t);

More About

collapse all

Paley (Natural) and Sequency (Frequency) Ordering

The discrete wavelet packet transform iterates on both approximation and detail coefficients at each level. In this transform, A denotes the lowpass (approximation) filter followed by downsampling. D denotes the highpass (detail) filter followed by downsampling. The following figure represents a wavelet packet transform in Paley ordering acting on a time series of length 8. The transform has a depth of two.

Because of aliasing introduced by downsampling, the frequency content extracted by the operator AD is higher than the frequency content extracted by the DD operator. Therefore, the terminal nodes in frequency (sequency) order are: AA,DA,DD,AD. The terminal nodes in Paley order have the following indices: 3,4,5,6. The frequency order has the indices: 3,4,6,5.


Wickerhauser, M.V. Lectures on Wavelet Packet Algorithms, Technical Report, Washington University, Department of Mathematics, 1992.

See Also


Introduced in R2010b

Was this topic helpful?