File: soft.R

package info (click to toggle)
r-cran-waveslim 1.8.5-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 1,096 kB
  • sloc: ansic: 894; makefile: 2
file content (5 lines) | stat: -rw-r--r-- 81 bytes parent folder | download | duplicates (4)
1
2
3
4
5
soft <- function(x, T) {
  y <- max(abs(x) - T, 0)
  return(y/(y+T) * x)
}