view toolboxes/alps/ALPS/thresh.m @ 226:2124e4884765 danieleb

Update to reflect default branch.
author luisf <luis.figueira@eecs.qmul.ac.uk>
date Thu, 12 Apr 2012 13:59:59 +0100
parents 0de08f68256b
children
line wrap: on
line source
function x= thresh(x, K)

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