The HAVSIN(x,x0,h0,x1,h1) function defines a haversine function, which makes a smooth transition between two functions.
Arguments
x |
The independent variable. You can enter a valid expression for the independent variable such as 2*TIME.
|
x0 |
The value of the independent variable at which the function begins. |
h0 |
The value of the function at x0. |
x1 |
The value of the independent variable at which the function ends. |
h1 |
The value of the function value at x1. |
Function Definition
HAVSIN(x,x0,h0,x1,h1) =
h0
|
x ≤ x0
|
a + b * sin(c(x)*Π - (Π/2))
|
x0 < x < x1
|
h1
|
x ≥ x1
|
where
a = (h1+h0)/2
b = (h1-h0)/2
c(x) = ( x-x0)/ (x1-x0)