Main Content

imodwpt

Inverse maximal overlap discrete wavelet packet transform

Description

xrec = imodwpt(coefs) returns the inverse maximal overlap discrete wavelet packet transform (inverse MODWPT), in xrec. The inverse transform is for the terminal node coefficient matrix (coefs) obtained using modwpt with the default length 18 Fejér-Korovkin ("fk18") wavelet.

example

xrec = imodwpt(coefs,wname) returns the inverse MODWPT using the wavelet specified by wname.

example

xrec = imodwpt(coefs,lo,hi) returns the inverse MODWPT using the orthogonal scaling filter, lo, and wavelet filter, hi.

example

Examples

collapse all

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")

Figure contains 2 axes objects. Axes object 1 with title Original ECG Waveform contains an object of type line. Axes object 2 with title Reconstructed ECG Waveform contains an object of type line.

Demonstrate perfect reconstruction. Find the largest absolute difference between the original signal and the reconstruction.

max(abs(wecg-xrec'))
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 ('db2').

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")

Figure contains 2 axes objects. Axes object 1 with title Original SOI Waveform contains an object of type line. Axes object 2 with title Reconstructed SOI Waveform contains an object of type line.

Input Arguments

collapse all

Terminal node coefficients of a wavelet packet tree, specified as a matrix. You must obtain the coefficient matrix from modwpt using the FullTree=false option. FullTree=false is the default value of modwpt. The 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 signal.

Data Types: single | double
Complex Number Support: Yes

Orthogonal 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 modwpt.

Orthogonal wavelet filters, specified as a pair of even-length real-valued vectors. lo is the scaling (lowpass) filter and hi is the wavelet (highpass) filter. lo and hi must be the same filter pair used in the analysis with modwpt. You cannot specify both wname and a filter pair lo,hi.

Data Types: single | double

Output Arguments

collapse all

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 coefs matrix.

References

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

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

Extended Capabilities

Version History

Introduced in R2016a

expand all