Mercurial > hg > smallbox
view toolboxes/alps/ALPS/thresh.m @ 188:2f5ce7c8792a danieleb
removed check for wLength as not necessary.
author | daniele@danieleb.com |
---|---|
date | Wed, 15 Feb 2012 11:02:45 +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;