electricpy.math.step

electricpy.math.step(t)[source]

Step Function [ u(t) ].

Simple implimentation of numpy.heaviside function to provide standard step-function as specified to be zero at \(x < 0\), and one at \(x \geq 0\).

Examples

>>> import numpy as np
>>> from electricpy.math import step
>>> t = np.array([-10, -8, -5, -3, 0, 1, 2, 5, 7, 15])
>>> step(t)
array([0., 0., 0., 0., 1., 1., 1., 1., 1., 1.])
Parameters:
t : arraylike

Time samples for which the step response should be generated.