The SDL Component Suite is an industry leading collection of components supporting scientific and engineering computing. Please visit the SDL Web site for more information....


Unit: SDL_math1
Class: None
Declaration: [1] function InterpolTable (Arg, RangeLo, RangeHi: double; const Pivots: TDoubleArray): double;
[2] function InterpolTable (Arg, RangeLo, RangeHi: double; const Pivots: TIntArray): double;

The function InterpolTable interpolates a function defined by the open array of regularly spaced pivoit points (parameter Pivots) at the position given by Arg. The first and the last pivot points are defined by the parameters RangeLo and RangeHi. If the argument Arg is less than RangeLo or greater than RangeHi the returned function value is extrapolated using the first or the last line segment, respectively. The two overloaded versions differ only in the type of the pivot array (double vs. integer).

The function raises an exception if the pivot table contains less than two elements and if the range spanned by the pivot table is zero.

Last Update: 2016-Sep-27