Click or drag to resize
Accord.NET (logo)

ToolsInterpolate1D Method

Interpolates data using a piece-wise linear function.

Namespace:  Accord.Math
Assembly:  Accord.Math (in Accord.Math.dll) Version: 3.8.0
Syntax
public static double Interpolate1D(
	double value,
	double[] x,
	double[] y,
	double lower,
	double upper
)
Request Example View Source

Parameters

value
Type: SystemDouble
The value to be calculated.
x
Type: SystemDouble
The input data points x. Those values need to be sorted.
y
Type: SystemDouble
The output data points y.
lower
Type: SystemDouble
The value to be returned for values before the first point in x.
upper
Type: SystemDouble
The value to be returned for values after the last point in x.

Return Value

Type: Double
Computes the output for f(value) by using a piecewise linear interpolation of the data points x and y.
See Also