annotate toolboxes/alps/ALPS/thresh.m @ 247:ecce33192fcc tip

Added tag ver_2.1 for changeset cef4500b936f
author luisf <luis.figueira@eecs.qmul.ac.uk>
date Wed, 31 Oct 2012 12:24:44 +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;