Inverse maximal overlap discrete wavelet packet transform
Perfect Reconstruction with the Inverse MODWPT
Obtain the MODWPT of an ECG waveform and demonstrate perfect reconstruction using the inverse MODWPT.
load wecg wpt = modwpt(wecg); xrec = imodwpt(wpt); tiledlayout(2,1) nexttile plot(wecg) axis tight title("Original ECG Waveform") nexttile plot(xrec) axis tight title("Reconstructed ECG Waveform")
Demonstrate perfect reconstruction. Find the largest absolute difference between the original signal and the reconstruction.
ans = 1.7903e-11
Inverse MODWPT Using Daubechies Extremal Phase Wavelet
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");
Inverse MODWPT Using Scaling and Wavelet Filters
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.
tiledlayout(2,1) nexttile plot(soi) axis tight title("Original SOI Waveform") nexttile plot(xrec) axis tight 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
modwpt using the
FullTree=false is the default value of
imodwpt function only accepts the terminal nodes of
a wavelet packet tree. If you do not modify the coefficients,
xrec is a perfect reconstruction of the
Complex Number Support: Yes
wname — Synthesizing wavelet
"fk18" (default) | character vector | string scalar
Synthesizing wavelet used to invert the MODWPT, specified as a character
vector or string scalar.
wname must be the same wavelet
used in the analysis with
lo,hi — Filters
even-length real-valued vectors
Filters, specified as a pair of even-length real-valued vectors.
lo is the orthogonal scaling filter and
hi is the orthogonal wavelet filter.
hi must be the same filter
pair used in the analysis with
modwpt. You cannot specify
wname and a scaling-wavelet filter pair.
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.
xrec has the
same number of columns as the input
 Percival, Donald B., and Andrew T. Walden. Wavelet Methods for Time Series Analysis. Cambridge Series in Statistical and Probabilistic Mathematics. Cambridge ; New York: 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. Series A: Mathematical, Physical and Engineering Sciences 454, no. 1976 (August 8, 1998): 2243–66. https://doi.org/10.1098/rspa.1998.0257.
C/C++ Code Generation
Generate C and C++ code using MATLAB® Coder™.
Usage notes and limitations:
wnamemust be constant.
Version HistoryIntroduced in R2016a
R2023b: Compute inverse MODWPT of complex-valued signals
imodwpt function can invert the MODWPT of complex-valued
R2023a: Supports single-precision data
imodwpt function supports single-precision data.