MathUtilInterp Method (Double, Double, Double, ExtrapolationTypes) |
1-D linear interpolation (table lookup)
Interpolates to find y, the value of the underlying function yTable at the point x.
xTable must be a monoton increasing array of the same length as yTable.
For x values outside xTable extrapolation is applied. Extrapolation method is
specified.
Namespace:
DHI.Mike1D.Generic
Assembly:
DHI.Mike1D.Generic (in DHI.Mike1D.Generic.dll) Version: 19.0.0.0 (11.1.1.1111)
Syntax public static double Interp(
double x,
double[] xTable,
double[] yTable,
ExtrapolationTypes extrapolationType
)
Public Shared Function Interp (
x As Double,
xTable As Double(),
yTable As Double(),
extrapolationType As ExtrapolationTypes
) As Double
public:
static double Interp(
double x,
array<double>^ xTable,
array<double>^ yTable,
ExtrapolationTypes extrapolationType
)
Parameters
- x
- Type: SystemDouble
value where to look up - xTable
- Type: SystemDouble
Monoton vector of length n - yTable
- Type: SystemDouble
vector of length n - extrapolationType
- Type: DHI.Mike1D.GenericExtrapolationTypes
How to extrapolate if not within xTable span
Return Value
Type:
Doubleinterpolated value (looked up value)
See Also