Click or drag to resize

CurveBaseCubicSplineCoefficients Method

Calculate the spline coefficients y2(i) and y3(i) for a natural cubic spline, given the abscissa x(i), the ordinate y(i), and the 1st derivative y1(i).

Namespace: Altaxo.Calc.Interpolation
Assembly: AltaxoCore (in AltaxoCore.dll) Version: 4.8.3179.0 (4.8.3179.0)
Syntax
C#
public void CubicSplineCoefficients(
	IReadOnlyList<double> x,
	IReadOnlyList<double> y,
	IReadOnlyList<double> y1,
	Vector<double> y2,
	Vector<double> y3
)

Parameters

x  IReadOnlyListDouble
The vector (lo,hi) of data abscissa (must be strictly increasing).
y  IReadOnlyListDouble
The vector (lo,hi) of ordinate.
y1  IReadOnlyListDouble
The vector containing the 1st derivative y'(x(i)).
y2  VectorDouble
Output: the spline coefficients y2(i).
y3  VectorDouble
Output: the spline coefficients y3(i).
Remarks
C#
The spline interpolation can then be evaluated using Horner's rule

     P(u) = y(i) + dx * (y1(i) + dx * (y2(i) + dx * y3(i)))

where  x(i) <= u < x(i+1) and dx = u - x(i).
See Also