Haversine Step (HAVSIN)

Defines a haversine function. HAVSIN is most often used to represent a smooth transition between two functions.
 
Note:  
The HAVSIN function behavior is similar to the behavior of the STEP functions. HAVSIN is much smoother than either of these functions. The smoothness, however, causes its derivatives to be slightly larger than that of STEP
The following plot shows a comparison between HAVSIN and STEP, STEP5, and TANH.

Format

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

Arguments

 
x
Real variable that specifies the independent variable.
Begin At
Real variable that specifies the x value at which the haversine function begins.
End At
Real variable that specifies the x value at which the haversine function ends.
Initial Function Value
Initial value of the haversine function.
Final Function Value
Final value of the haversine function.

Example

The following function defines a smooth step function from time 1 to time 2 with a displacement from 0 to 1:
HAVSIN(TIME, 1, 0, 2, 1)