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

    %% MODWPT Details Using Default Wavelet
% Obtain the MODWPT of an electrocardiogram (ECG) signal using the default
% length 18 Fejer-Korovkin (|'fk18'|) wavelet and the default level, 4.
load wecg;
wptdetails = modwptdetails(wecg);
%%
% Demonstrate that summing the MODWPT details over each sample reconstructs
% the signal. The largest absolute difference between the original signal
% and the reconstruction is on the order of $10^{-11}$, which demonstrates 
% perfect reconstruction.
xrec = sum(wptdetails);
max(abs(wecg-xrec'))