www.gusucode.com > wavelet 源码程序 matlab案例代码 > wavelet/InverseMODWTWithSpecifiedWaveletExample.m

    %% Inverse MODWT with Specified Wavelet
% 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. 

% Copyright 2015 The MathWorks, Inc.

load DM_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 $10^{-13}$, which demonstrates perfect reconstruction.
norm(abs(xrec'-DM_USD),Inf)