diff 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 diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/toolboxes/alps/ALPS/thresh.m	Fri Aug 12 11:17:47 2011 +0100
@@ -0,0 +1,4 @@
+function x= thresh(x, K)
+
+[~, ind] = sort(abs(x), 'descend');
+x(ind(K+1:end))= 0;
\ No newline at end of file