| Contents | Index |
[SPEC,TIMES,FREQ]
= wpspectrum(WPT,Fs)
[...] = wpspectrum(WPT,Fs,'plot')
[...,TNFO] = wpspectrum(...)
[SPEC,TIMES,FREQ] = wpspectrum(WPT,Fs) returns a matrix of wavelet packet spectrum estimates, SPEC, for the binary wavelet packet tree object, WPT. Fs is the sampling frequency in Hertz. SPEC is a 2J-by-N matrix where J is the level of the wavelet packet transform and N is the length of the time series. TIMES is a 1-by-N vector of times and FREQ is a 1-by-2J vector of frequencies.
[...] = wpspectrum(WPT,Fs,'plot') displays the wavelet packet spectrum.
[...,TNFO] = wpspectrum(...) returns the terminal nodes of the wavelet packet tree in frequency order.
The wavelet packet spectrum contains the absolute values of the coefficients from the frequency-ordered terminal nodes of the input binary wavelet packet tree. The terminal nodes provide the finest level of frequency resolution in the wavelet packet transform. If J denotes the level of the wavelet packet transform and Fs is the sampling frequency, the terminal nodes approximate bandpass filters of the form:
![]()
At the terminal level of the wavelet packet tree, the transform
divides the interval from 0 to the Nyquist frequency into bands of
approximate width
![]()
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');
wpspectrum computes the wavelet packet spectrum as follows:
Extract the wavelet packet coefficients corresponding to the terminal nodes. Take the absolute value of the coefficients.
Order the wavelet packet coefficients by frequency ordering.
Determine the time extent on the original time axis corresponding to each wavelet packet coefficient. Repeat each wavelet packet coefficient to fill in the time gaps between neighboring wavelet packet coefficients and create a vector equal in length to node 0 of the wavelet packet tree object.
Wickerhauser, M.V. Lectures on Wavelet Packet Algorithms, Technical Report, Washington University, Department of Mathematics, 1992.

Includes the most popular MATLAB recorded presentations with Q&A sessions led by MATLAB experts.
| © 1984-2012- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |