Main Content

imodwt

Inverse maximal overlap discrete wavelet transform

Description

example

xrec= imodwt(w)reconstructs the signal based on the maximal overlap discrete wavelet transform (MODWT) coefficients inw. By default,imodwtassumes that you obtainedwusing the'sym4'wavelet with periodic boundary handling. If you do not modify the coefficients,xrecis a perfect reconstruction of the signal.

example

xrec= imodwt(w,wname)reconstructs the signal using the orthogonal waveletwname.wnamemust be the same wavelet used to analyze the signal input tomodwt.

example

xrec= imodwt(w,Lo,Hi)reconstructs the signal using the orthogonal scaling filterLoand the wavelet filterHi. TheLoandHifilters must be the same filters used to analyze the signal input tomodwt.

example

xrec= imodwt(___,lev)采样的信号水平lev.xrecis a projection onto the scaling space at levellev. The default level is 0, which results in perfect reconstruction if you do not modify the coefficients.

example

xrec= imodwt(___,'reflection')uses the reflection boundary condition in the reconstruction. If you specify'reflection',imodwtassumes that the length of the original signal length is one half the number of columns in the input coefficient matrix. By default,imodwtassumes periodic signal extension at the boundary.

You must enter the entire character vector'reflection'. If you added a wavelet named'reflection'using the wavelet manager, you must rename that wavelet prior to using this option.'reflection'may be placed in any position in the input argument list afterx.

Examples

崩溃all

Obtain the MODWT of an ECG signal and demonstrate perfect reconstruction.

Load the ECG signal data and obtain the MODWT.

loadwecg;

Obtain the MODWT and the Inverse MODWT.

w = modwt(wecg); xrec = imodwt(w);

Use the L-infinity norm to show that the difference between the original signal and the reconstruction is extremely small. The largest absolute difference between the original signal and the reconstruction is on the order of 1 0 - 1 2 , which demonstrates perfect reconstruction.

norm(abs(xrec'-wecg),Inf)
ans = 2.3255e-12

Obtain the MODWT of Deutsche Mark-U.S. Dollar exchange rate data and demonstrate perfect reconstruction.

Load the Deutsche Mark-U.S. Dollar exchange rate data.

loadDM_USD;

Obtain the MODWT and the Inverse MODWT using the'db2'wavelet.

wdm = modwt(DM_USD,'db2'); xrec = imodwt(wdm,'db2');

Use the L-infinity norm to show that the difference between the original signal and the reconstruction is extremely small. The largest absolute difference between the original signal and the reconstruction is on the order of 1 0 - 1 3 , which demonstrates perfect reconstruction.

norm(abs(xrec'-DM_USD),Inf)
ans = 1.6370e-13

获得一个心电图信号使用的MODWT Fejer -Korovkin filters.

Load the ECG data.

loadwecg;

Create the 8-coefficient Fejer-Korovkin filters.

[Lo,Hi] = wfilters('fk8');

Obtain the MODWT and Inverse MODWT.

wtecg = modwt(wecg,Lo,Hi); xrec = imodwt(wtecg,Lo,Hi);

Plot the original data and the reconstruction.

subplot(2,1,1) plot(wecg) title('ECG Signal'); subplot(2,1,2) plot(xrec) title('Reconstruction')

Figure contains 2 axes objects. Axes object 1 with title ECG Signal contains an object of type line. Axes object 2 with title Reconstruction contains an object of type line.

Obtain the MODWT of an ECG signal down to the maximum level and obtain the projection of the ECG signal onto the scaling space at level 3.

Load the ECG data.

loadwecg;

Obtain the MODWT.

wtecg = modwt(wecg);

Obtain the projection of the ECG signal onto V 3 , the scaling space at level three by using theimodwtfunction.

v3proj = imodwt(wtecg,3);

Plot the original signal and the projection.

subplot(2,1,1) plot(wecg) title('Original Signal') subplot(2,1,2) plot(v3proj) title('Projection onto V3')

Figure contains 2 axes objects. Axes object 1 with title Original Signal contains an object of type line. Axes object 2 with title Projection onto V3 contains an object of type line.

Note that the spikes characteristic of the R waves in the ECG are missing in the V 3 approximation. You can see the missing details by examining the wavelet coefficients at level three.

Plot the level-three wavelet coefficients.

figure plot(wtecg(3,:)) title('Level-Three Wavelet Coefficients')

Figure contains an axes object. The axes object with title Level-Three Wavelet Coefficients contains an object of type line.

Obtain the inverse MODWT using reflection boundary handling for Southern Oscillation Index data. The sampling period is one day.imodwtwith the'reflection'option assumes that the input matrix, which is themodwtoutput, is twice the length of the original signal length.imodwtreflection boundary handling reduces the number of wavelet and scaling coefficients at each scale by half.

loadsoi; wsoi = modwt(soi,4,'reflection'); xrecsoi = imodwt(wsoi,'reflection');

Use the L-infinity norm to show that the difference between the original signal and the reconstruction is extremely small. The largest absolute difference between the original signal and the reconstruction is on the order of 1 0 - 1 1 , which demonstrates perfect reconstruction.

norm(abs(xrecsoi'-soi),Inf)
ans = 1.6421e-11

Load the 23 channel EEG dataEspiga3[2]. The channels are arranged column-wise. The data is sampled at 200 Hz.

loadEspiga3

Obtain the maximal overlap discrete wavelet transform down to the maximum level.

w = modwt(Espiga3);

Reconstruct the multichannel signal. Plot the original data and reconstruction.

xrec = imodwt(w); subplot(2,1,1) plot(Espiga3) title('Original Data') subplot(2,1,2) plot(xrec) title('Reconstruction')

Figure contains 2 axes objects. Axes object 1 with title Original Data contains 23 objects of type line. Axes object 2 with title Reconstruction contains 23 objects of type line.

Input Arguments

崩溃all

MODWT transform of a signal or multisignal down to levelL, specified as a matrix or 3-D array, respectively.wis anL+1-by-Nmatrix for the MODWT of anN-point signal, and anL+1-by-N-by-NCarray for the MODWT of anN-by-NCmultisignal. By default,imodwtassumes that you obtained the MODWT using the'sym4'wavelet with periodic boundary handling.

Data Types:single|double
Complex Number Support:Yes

Synthesis wavelet, specified as one of the following:

  • 'haar'— Haar wavelet

  • 'dbN'— Extremal phase Daubechies wavelet withNvanishing moments, whereNis a positive integer from 1 to 45.

  • 'symN'— Symlets wavelet withNvanishing moments, whereNis a positive integer from 2 to 45.

  • 'coifN'— Coiflets wavelet withNvanishing moments, whereNis a positive integer from 1 to 5.

  • 'fkN'— Fejér-Korovkin wavelet withNcoefficients, whereN = 4, 6, 8, 14, 18and22.

The synthesis wavelet must be the same wavelet used in the analysis withmodwt.

Filters, specified as a pair of even-length real-valued vectors.Lois the scaling filter, andHiis the wavelet filter.LoandHimust be the same filters used in the analysis withmodwt. The filters must satisfy the conditions for an orthogonal wavelet. The lengths ofLoandHimust be equal. Seewfiltersfor additional information. You cannot specify both a waveletwnameand filter pairLo,Hi.

Reconstruction level, specified as a nonnegative integer between 0 andsize(w,1)-2. The level must be less than the level used to obtainwfrommodwt. Iflevis 0 and you do not modify the coefficients,imodwtproduces a perfect reconstruction of the signal.

Output Arguments

崩溃all

Reconstructed version of the original signal or multisignal based on the MODWT and the level of reconstruction, returned as a vector or matrix.

References

[1] Percival, Donald B., and Andrew T. Walden.小波时间序列分析的方法. Cambridge Series in Statistical and Probabilistic Mathematics. Cambridge ; New York: Cambridge University Press, 2000.

[2] Mesa, Hector. “Adapted Wavelets for Pattern Detection.” InProgress in Pattern Recognition, Image Analysis and Applications, edited by Alberto Sanfeliu and Manuel Lazo Cortés, 3773:933–44. Berlin, Heidelberg: Springer Berlin Heidelberg, 2005. https://doi.org/10.1007/11578079_96.

Extended Capabilities

Version History

Introduced in R2015b