wpspectrum

Syntax

Description

[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.

More About

Wavelet Packet Spectrum

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:

[nFs2J+1,(n+1)Fs2J+1)n=0,1,2,3,…2J−1

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 Fs/2J+1.

Algorithms

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.