www.gusucode.com > wavelet 源码程序 matlab案例代码 > wavelet/MODWPTFullPacketTreeAndPassbandCenterFrequenciesExample.m

    %% MODWPT Full Packet Tree and Passband Center Frequencies
% Obtain the MODWPT and full wavelet packet tree of an ECG waveform using 
% the default length 18 Fejer-Korovkin (|'fk18'|) wavelet. Extract and plot
% the node coefficients at level 3, node 2.
load wecg;     
[wpt,packetlevels,cfreq] = modwpt(wecg,'FullTree',true);
p3 = wpt(packetlevels==3,:);
plot(p3(3,:))
title('Level 3, Node 2 Wavelet Coefficients')
%%
% Display the center frequencies at level 3. 
cfreq(packetlevels==3,:)