| Algorithm 3 CoSaMP |
| Input: Initialize: // find k columns of that are most strongly correlated with residual Output: k-sparse coefficient vector x while do // number of new columns to be selected // find columns of that are most strongly correlated with residual // merge the new columns such that // find the best coefficients for residual approximation // find the set of sparsity // find sparse vector x // update the residual end while |