Cut wavelet packet tree
T = wpcutree(T,L)
[T,RN] = wpcutree(T,L)
wpcutree is a one- or two-dimensional wavelet packet analysis function.
T = wpcutree(T,L) cuts the tree T at level L.
[T,RN] = wpcutree(T,L) returns the same arguments as above and, in addition, the vector RN contains the indices of the reconstructed nodes.
% The current extension mode is zero-padding (see dwtmode). % Load signal. load noisdopp; x = noisdopp; % Decompose x at depth 3 with db1 wavelet packets % using Shannon entropy. wpt = wpdec(x,3,'db1'); % Plot wavelet packet tree wpt. plot(wpt)
% Cut wavelet packet tree at level 2. nwpt = wpcutree(wpt,2); % Plot new wavelet packet tree nwpt. plot(nwpt)