powered by
Smooth approximations to max(x, 0) and min(x, 0)
max0_smooth(x, rho = 20)min0_smooth(x, rho = 20)
min0_smooth(x, rho = 20)
the approximate maximum or minimum of x and 0
a vector of values
smoothing parameter, larger values lead to closer approximation
x <- seq(-1, 1, by = 0.1) min0_smooth(x) max0_smooth(x)
Run the code above in your browser using DataLab