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'
)
[
returns the terminal
nodes of the binary wavelet packet tree, Tn_Pal
,Tn_Seq
]
= otnodes(WPT
)WPT
,
in Paley (natural) ordering, Tn_Pal
, and sequency
(frequency) ordering, Tn_Seq
. Tn_Pal
and Tn_Seq
are Nby1
column vectors where N is the number of terminal
nodes.
[
returns the permutations
of the terminal node indices such that Tn_Pal
,Tn_Seq
,I
,J
]
= otnodes(WPT
)Tn_Seq = Tn_Pal(I)
and Tn_Pal
= Tn_Seq(J)
.
[
returns
the Paley and frequencyordered terminal nodes in node depthposition
format. DP_Pal
,DP_Seq
]
= otnodes(WPT
,'dp'
)DP_Pal
and DP_Seq
are Nby2
matrices. The first column contains the depth index, and the second
column contains the position index.

Binary wavelet packet tree. You can use 

String variable indicating that the Paleyordered or sequencyordered nodes are returned in depthposition format. 

Terminal nodes in Paley (natural) ordering 

Terminal nodes in sequency ordering 

Paleyordered terminal nodes in depthposition format. This
output argument only applies when you use the 

Sequencyordered terminal nodes in depthposition format. This
output argument only applies when you use the 
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); isequal(Tn_Seq(J),Tn_Pal) isequal(Tn_Seq,Tn_Pal(I))
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); plot(t); [tn_Pal,tn_Seq,I,J] = otnodes(t);
Wickerhauser, M.V. Lectures on Wavelet Packet Algorithms, Technical Report, Washington University, Department of Mathematics, 1992.