view toolboxes/alps/ALPS/thresh.m @ 154:0de08f68256b ivand_dev

ALPS toolbox - Algebraic Pursuit added to smallbox
author Ivan Damnjanovic lnx <ivan.damnjanovic@eecs.qmul.ac.uk>
date Fri, 12 Aug 2011 11:17:47 +0100
parents
children
line wrap: on
line source
function x= thresh(x, K)

[~, ind] = sort(abs(x), 'descend');
x(ind(K+1:end))= 0;