0001 function y = soft(x,T) 0002 if sum(abs(T(:)))==0 0003 y = x; 0004 else 0005 y = max(abs(x) - T, 0); 0006 y = y./(y+T) .* x; 0007 end 0008 0009