Heaviside Function#
Heaviside Step Function Wiki
$\(
H(x)=
\begin{cases}
1 & x \gt 0 \\
0 & x \lt 0 \\
\end{cases}
\)$
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, 1)
plt.plot(x, y);