Orthogonal matching Pursuit (OMP) and Compressive Sampling Matched Pursuit (CoSaMP) algorithm (see Needell and Tropp's 2008 paper http://arxiv.org/abs/0803.2392 ). This implementation allows several variants, and it also allows you to specify a matrix via function handles (useful if your matrix represents an FFT or similar).
A demo code shows how to use both the OMP.m and CoSaMP.m functions.
OMP and CoSaMP are useful for sparse recovery problems; in particular, they can be used for compressed sensing (aka compressive sampling), image denoising and deblurring, seismic tomography problems, MRI, etc.
Another good OMP implementation (C++, Matlab) is here:
(Updated, March 2012: SPAMS now has python and R bindings as well)
And a CoSaMP implementation (I haven't tested):
Edit: that CoSaMP implementation mentioned above is buggy. Read this:
Update, Feb 2012: for a blog discussion of several way to implement CoSaMP, see this website:
Stephen Becker (2021). CoSaMP and OMP for sparse recovery (https://www.mathworks.com/matlabcentral/fileexchange/32402-cosamp-and-omp-for-sparse-recovery), MATLAB Central File Exchange. Retrieved .
Find the treasures in MATLAB Central and discover how the community can help you!Start Hunting!