Interpolation.Akima Method
Performs Akima spline interpolation at a single point.
Definition
Namespace: Numerics.NET
Assembly: Numerics.NET (in Numerics.NET.dll) Version: 10.0.0
C#
The interpolated y-value at x.
Assembly: Numerics.NET (in Numerics.NET.dll) Version: 10.0.0
public static double Akima(
double[] xValues,
double[] yValues,
double x
)Parameters
- xValues Double[]
- The x-coordinates of the data points. Must be strictly increasing.
- yValues Double[]
- The y-coordinates of the data points.
- x Double
- The x-coordinate at which to interpolate.
Return Value
DoubleThe interpolated y-value at x.
Remarks
This method creates a temporary Akima spline curve object that is robust against outliers and evaluates it at the specified point. Note: This method should only be used for one-off calculations. For repeated evaluations on the same data, use AkimaSpline(Double[], Double[]) to create a reusable curve object, which will be more efficient.
Exceptions
| Argument | xValues or yValues is null. |
| Dimension | The lengths of xValues and yValues do not match. |
| Argument | xValues does not have at least 2 elements, or the values in xValues are not strictly increasing. |