annotate toolboxes/alps/ALPS/thresh.m @ 217:8b3c71bb44eb luisf_dev

Removed "clear all" from example scripts (subs by "clear" instead)
author luisf <luis.figueira@eecs.qmul.ac.uk>
date Thu, 22 Mar 2012 14:41:04 +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;