view toolboxes/alps/ALPS/thresh.m @ 225:f0441ef3ae8f danieleb

Updating this branch in order to reflect the default branch.
author luisf <luis.figueira@eecs.qmul.ac.uk>
date Thu, 12 Apr 2012 13:53:23 +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;