www.gusucode.com > wavelet 源码程序 matlab案例代码 > wavelet/AdaptiveApproximationusingOrthogonalMatchingPursuitExample.m
%% Adaptive Approximation using Orthogonal Matching Pursuit % Approximate the |cuspamax| signal with the dictionary using orthogonal % matching pursuit. %% % Use a dictionary consisting of |sym4| wavelet packets and the DCT-II basis. load cuspamax; mpdict = wmpdictionary(length(cuspamax),'LstCpt',... {{'wpsym4',2},'dct'}); yfit = wmpalg('OMP',cuspamax,mpdict); plot(cuspamax,'k'); hold on; plot(yfit,'linewidth',2); legend('Original Signal',... 'Matching Pursuit');