Inverse maximal overlap discrete wavelet packet transform
Obtain the MODWPT of an ECG waveform and demonstrate perfect reconstruction using the inverse MODWPT.
load wecg; wpt = modwpt(wecg); xrec = imodwpt(wpt); subplot(2,1,1) plot(wecg); title('Original ECG Waveform'); subplot(2,1,2) plot(xrec); title('Reconstructed ECG Waveform');
Find the largest absolute difference between the original signal and the reconstruction. The difference is on the order of , which demonstrates perfect reconstruction.
ans = 1.7903e-11
Obtain the MODWPT of Southern Oscillation Index data using the Daubechies extremal phase wavelet with two vanishing moments (
'db2'). Reconstruct the signal using the inverse MODWPT.
load soi; wsoi = modwpt(soi,'db2'); xrec = imodwpt(wsoi,'db2');
Obtain the MODWPT of Southern Oscillation Index data using specified scaling and wavelets filters with the Daubechies extremal phase wavelet with two vanishing moments (
load soi; [lo,hi] = wfilters('db2'); wpt = modwpt(soi,lo,hi); xrec = imodwpt(wpt,lo,hi);
Plot the original SOI waveform and the reconstructed waveform.
subplot(2,1,1) plot(soi) title('Original SOI Waveform'); subplot(2,1,2) plot(xrec) title('Reconstructed SOI Waveform')
coefs— Terminal node coefficients
Terminal node coefficients of a wavelet packet tree, specified
as a matrix. You must obtain the coefficient matrix from
the default value of
wname— Synthesizing wavelet filter
fk18(default) | character vector | string scalar
Synthesizing wavelet filter used to invert the MODWPT, specified as a character vector or
string scalar. The specified wavelet must be the same wavelet as used in the
xrec— Inverse maximal overlap discrete wavelet packet transform
Inverse maximal overlap discrete wavelet packet transform, returned
as a row vector. The inverse transform is the reconstructed version
of the original signal based on the MODWPT terminal node coefficients.
the same number of columns as the input
 Percival, D. B., and A. T. Walden. Wavelet Methods for Time Series Analysis. Cambridge, UK: Cambridge University Press, 2000.
 Walden, A.T., and A. Contreras Cristan. “The phase-corrected undecimated discrete wavelet packet transform and its application to interpreting the timing of events.” Proceedings of the Royal Society of London A. Vol. 454, Issue 1976, 1998, pp. 2243-2266.
Usage notes and limitations:
wname must be constant.