Description
Evaluate the Heaviside function with threshold indicating the discontinuity.
If elements in x are greater than or equal to threshold, returns 1.
Otherwise, returns 0.
Usage
Heaviside(x, threshold = 0)
Value
A vector of 1 and 0. 1 indicates the element in x is larger or equal to the threshold.
Arguments
- x
(Numeric) A numeric vector.
- threshold
(Numeric) A threshold value used to compare to elements in x. (Defaults to 0.)