Heaviside: Heaviside function.

Description Usage Arguments Value Examples

Description

The piecewise constant Heaviside/unit step function.

Usage

1
Heaviside(x, H0 = 0L)

Arguments

x

A numeric (vector).

H0

Selects one of three versions of the Heaviside function. A value out of {0, 0.5, 1} corresponding to Heaviside(0)

Value

A numeric vector of the same length as x with elements out of {0, 1}, respectively {0, 0.5, 1} if H0 = 0.5.

Examples

1
2
3
4
5
x <- (-2):2
cbind(x, Heaviside(x, H0 = 0))
cbind(x, Heaviside(x, H0 = 0.5))
cbind(x, Heaviside(x, H0 = 1))
## Not run: cbind(x, Heaviside(x, H0 = 0.3))

dschlaep/ecotoner documentation built on May 15, 2019, 2:57 p.m.