diff DL/Majorization Minimization DL/softthreshold.m @ 159:23763c5fbda5 danieleb

Merge
author Daniele Barchiesi <daniele.barchiesi@eecs.qmul.ac.uk>
date Wed, 31 Aug 2011 10:43:32 +0100
parents b14209313ba4
children
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/DL/Majorization Minimization DL/softthreshold.m	Wed Aug 31 10:43:32 2011 +0100
@@ -0,0 +1,6 @@
+% Soft threshold operator for matrices
+% [Y] = softthreshold(X,theta)
+% X : input matrix
+% theta : thresholding parameter
+function [Y] = softthreshold(X,theta)
+Y = X - min(theta,abs(X)).*sign(X);
\ No newline at end of file