Ramp Function#
Ramp Function Wiki
\( \begin{aligned} R(x)= \begin{cases} x & x \ge 0 \\ 0 & x \lt 0 \\ \end{cases} =\text{max}\, (x, 0) \end{aligned} \)
import numpy as np
import matplotlib.pyplot as plt
x = np.linspace(-2, 2, 4001)
a = -1
b = 1
y = np.where(x < 0, 0, x)
plt.plot(x, y);