Wavelet packet spectrum
[SPEC,TIMES,FREQ]
= wpspectrum(WPT,Fs)
[...] = wpspectrum(WPT,Fs,'plot'
)
[...,TNFO] = wpspectrum(...)
[
returns
a matrix of wavelet packet spectrum estimates, SPEC
,TIMES
,FREQ
]
= wpspectrum(WPT
,Fs
)SPEC
,
for the binary wavelet packet tree object, WPT
. Fs
is
the sampling frequency in Hertz. SPEC
is a 2^{J}byN matrix
where J is the level of the wavelet packet transform
and N is the length of the time series. TIMES
is
a 1byN vector of times and FREQ
is
a 1by2^{J} vector of
frequencies.
[...] = wpspectrum(
displays
the wavelet packet spectrum.WPT
,Fs
,'plot'
)
[...,
returns
the terminal nodes of the wavelet packet tree in frequency order.TNFO
] = wpspectrum(...)



Sampling frequency in Hertz as a scalar of class double. Default: 1 

The string 

Wavelet packet spectrum. The frequency spacing between the rows of 

Time vector. 

Frequency vector. 

Terminal nodes. 
Wavelet packet spectrum for signal consisting of two sinusoids with disjoint support:
fs = 500; t = 0:1/fs:4; y = sin(32*pi*t).*(t<2) + sin(128*pi*t).*(t>=2); subplot(2,1,1); plot(t,y); axis tight title('Analyzed Signal'); % Wavelet packet spectrum level = 6; wpt = wpdec(y,level,'sym6'); subplot(2,1,2); [S,T,F] = wpspectrum(wpt,fs,'plot');
Wavelet packet spectrum of chirp:
fs = 1000; t = 0:1/fs:2; % create chirp signal y = sin(256*pi*t.^2); % Plot the analyzed signal subplot(2,1,1); plot(t,y); axis tight title('Analyzed Signal'); % Wavelet packet spectrum level = 6; wpt = wpdec(y,level,'sym8'); subplot(2,1,2); [S,T,F] = wpspectrum(wpt,fs,'plot');
Wickerhauser, M.V. Lectures on Wavelet Packet Algorithms, Technical Report, Washington University, Department of Mathematics, 1992.