STEP

Approximates the Heaviside step function with a cubic polynomial.
 
Notes:  
STEP has continuous first derivatives, but its second derivatives are discontinuous at x=x0 and x=x1. Haversine Step (HAVSIN), STEP5, and TANH offer other approximations for the Heaviside step function. These have a higher degree of continuity and differentiability, but can have larger derivatives.

See Haversine Step (HAVSIN) for a plot comparing STEP, STEP5, TANH, and Haversine Step (HAVSIN).

Format

STEP (x, Begin At, Initial Function Value, End At, Final Function Value)

Arguments

 
x
Independent variable.
Begin At or x0
Value of independent variable at which the STEP function begins; defined by a real number, an expression or a design variable.
Initial Function Value or h0
Initial value of the step; defined by a real number, an expression, a design variable or a run-time function.
End At or x1
Value of independent variable at which the STEP function ends; defined by a real number, an expression or a design variable.
Final Function Value or h1
Final value of the step; defined by a real number, an expression, a design variable or a run-time function.

Extended Definition

The STEP function approximates the Heaviside step function with a cubic polynomial. The following figure illustrates the STEP function.
The equation defining the STEP function is:

Example

Using a cubic polynomial, the following function defines a smooth step function from 3 to 4, with a displacement from 0 to 1:
STEP((2, 3, 3.5, 4, 5), 3, 0, 4, 1)
This example produces the following results:
0.0, 0.0, 0.5, 1.0, 1.0