Purpose
General-purpose interpolation
Synopsis
INTERP(X, X1, Y1, X2, Y2, ..., Xn, Yn)
Arguments
X
|
X-value to be interpolated.
|
Xi, Yi
|
Pairs of values for the interpolation. The Xi must be in increasing order.
|
Example
Typically X will be a variable and the interpolation pairs
(Xi,Yi) are given in an XV. Given the following matrix items:
Column: Total
XV : XVI: = = 0
= = 0
= = 1
= = 1
= = 2
= = 4
= = 3
= = 9
then the following formula interpolates X:
Further information
In the above example, if X has a current value of 1.5, then
the function will be evaluated as 2.5 (X is halfway between X=1 and X=2,
so the result is halfway between Y=1 and Y=4). As can be seen,
the points in this case are the squares of the integers, so the function is approximating
the square of X by interpolation.
If you have any comments or suggestions about these pages,
please send mail to docs@dashoptimization.com.