annotate toolboxes/alps/ALPS/thresh.m @ 185:a0e0982a17fe luisf_dev

started new branch; created folder for extra stuff.
author luisf <luis.figueira@eecs.qmul.ac.uk>
date Tue, 07 Feb 2012 17:18:13 +0000
parents 0de08f68256b
children
rev   line source
ivan@154 1 function x= thresh(x, K)
ivan@154 2
ivan@154 3 [~, ind] = sort(abs(x), 'descend');
ivan@154 4 x(ind(K+1:end))= 0;