Perform soft-thresholding given the cut-off value.
soft(x, t)
x
any numerical matrix or vector.
matrix
vector
t
numeric, the amount to soft-threshold, i.e., sgn(x_{ij}) (|x_{ij}-t|)_+.
numeric
sgn(x_{ij}) (|x_{ij}-t|)_+