STEP

The STEP(a, x1, y1, x2, y2) function returns a smooth step function applied to an expression a for time or for a result.

The smooth cubic function starts rising at (x1,y1) on the horizontal axis, and levels off at (x2,y2). Use this function in expressions for forces or motors.

Format

STEP(a, x1, y1, x2, y2)

Arguments

a Select any valid result from the list, or enter time.
x1 The point on the horizontal axis at which the step begins to rise.
y1 The value of the step function before the point x1.
x2 The point on the horizontal axis at which the step levels off.
y2 The value of the step function at the leveling off point x2.

Step Function Equation

The STEP function approximates the Heaviside step function with a cubic polynomial.

Function Definition
STEP (a, x1, y1, x2, y2) = y1 ; a ≤ x1
y1 + (y2 - y1) * z2*(3-2*z) ; x1< a < x2
y2 ; a ≥ x2
z = ((a - x1)/(x2 - x1))

Example

STEP(time, 1, 1, 2, 2) describes a smooth step function of time with the value 1 before 1 second. This function incorporates the cubic polynomial and levels off to the value 2 at 2 seconds.