view toolboxes/alps/ALPS/thresh.m @ 196:82b0d3f982cb danieleb

Merge
author danieleb <daniele.barchiesi@eecs.qmul.ac.uk>
date Wed, 14 Mar 2012 16:31:38 +0000
parents 0de08f68256b
children
line wrap: on
line source
function x= thresh(x, K)

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