


bpdq_soft_threshold : Soft thresholding operator x_t = bpdq_soft_threshold(x,tgamma) Applies soft thresholding to each component of x Inputs: x - input signal tgamma - threshold Outputs: x_t - soft thresholded result This file is part of BPDQ Toolbox (Basis Pursuit DeQuantizer) Copyright (C) 2009, the BPDQ Team (see the file AUTHORS distributed with this library) (See the notice at the end of the file.)


0001 % bpdq_soft_threshold : Soft thresholding operator 0002 % 0003 % x_t = bpdq_soft_threshold(x,tgamma) 0004 % 0005 % Applies soft thresholding to each component of x 0006 % 0007 % Inputs: 0008 % x - input signal 0009 % tgamma - threshold 0010 % 0011 % Outputs: 0012 % x_t - soft thresholded result 0013 % 0014 % This file is part of BPDQ Toolbox (Basis Pursuit DeQuantizer) 0015 % Copyright (C) 2009, the BPDQ Team (see the file AUTHORS distributed with 0016 % this library) (See the notice at the end of the file.) 0017 0018 function x_t = bpdq_soft_threshold(x,tgamma) 0019 tmp=abs(x)-tgamma; 0020 x_t = sign(x).*tmp.*(tmp>0); 0021 0022 % The BPDQ Toolbox is free software: you can redistribute it and/or modify 0023 % it under the terms of the GNU General Public License as published by 0024 % the Free Software Foundation, either version 3 of the License, or 0025 % (at your option) any later version. 0026 % 0027 % The BPDQ Toolbox is distributed in the hope that it will be useful, 0028 % but WITHOUT ANY WARRANTY; without even the implied warranty of 0029 % MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 0030 % GNU General Public License for more details. 0031 % 0032 % You should have received a copy of the GNU General Public License 0033 % along with The BPDQ Toolbox. If not, see <http://www.gnu.org/licenses/>.