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

    %% Perfect Reconstruction with the Inverse MODWT
% Obtain the MODWT of an ECG signal and demonstrate perfect reconstruction.
%% 
% Load the ECG signal data and obtain the MODWT.

% Copyright 2015 The MathWorks, Inc.

load wecg;
%%
% 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 $10^{-12}$, which demonstrates perfect reconstruction.

norm(abs(xrec'-wecg),Inf)