ILNumerics Ultimate VS

Interpolationspline Method (InArraySingle, InArraySingle, InArraySingle, InArraySingle, InArraySingle)

ILNumerics Ultimate VS Documentation
ILNumerics - Technical Application Development
One dimensional cubic spline interpolation.

[ILNumerics Interpolation Toolbox]

Namespace:  ILNumerics.Toolboxes
Assembly:  ILNumerics.Toolboxes.Interpolation (in ILNumerics.Toolboxes.Interpolation.dll) Version: (5.5.7503.3146)

public static RetArray<float> spline(
	InArray<float> V,
	InArray<float> X = null,
	InArray<float> Xn = null,
	InArray<float> lbDeriv = null,
	InArray<float> ubDeriv = null


Type: ILNumericsInArraySingle
Sampled values as columns of a matrix or multi-dimensional array. Size [n x m], n: number of points per sample set (column length), m: number of measurements.
X (Optional)
Type: ILNumericsInArraySingle
[Optional] Vector with positions for values in V. Default: (null) assumes spacing of 1.0 between row elements in V.
Xn (Optional)
Type: ILNumericsInArraySingle
[Optional] Vector of length k with new query points to interpolate. Default: (null) create new points by subdividing the ranges from X once.
lbDeriv (Optional)
Type: ILNumericsInArraySingle
[Optional] Vector of length m with first derivative(s) at the lower end of each sample set. Default (null): not-a-knot spline.
ubDeriv (Optional)
Type: ILNumericsInArraySingle
[Optional] Vector of length m with first derivative(s) at the upper end of each sample set. Default (null): not-a-knot spline.

Return Value

Type: RetArraySingle
Array of the same size as V, having the working dimension replaced with Xn.Length interpolated values.

Each column in V is treated as an independent set of sampled values. A piecewise cubic spline interpolation is performed for each column individually.

V can be a multi-dimensional array in which case the interpolation is done on a reshaped version of V = V[":;:"]. However, all dimensions of the original V are retained and considered for the return value (shape preserving).

While the rows of V hold the ensemble of measurements for each sample position, X holds the coordinates of these positions. If X is provided it must be a vector of length n with strictly monotonically increasing values, without any duplicates. If X is not provided (null) unit spacing of the row elements in V is assumed: 0..1..2..n-1.

Any values from Xn laying outside of the range of X are marked as NaN. Use the 2nd non-optional parameter ('outOfRangeValues') from the overload spline(InArraySingle, NullableSingle, InArraySingle, InArraySingle, InArraySingle, InArraySingle) in order to control this value or to get extrapolated values instead.

The spline(InArraySingle, NullableSingle, InArraySingle, InArraySingle, InArraySingle, InArraySingle) function serves as a wrapper for the SplineInterpolatorSingle object for syntactic convenience. Subsequent calls of spline() on the same data will recreate all temporary information necessary for the interpolation. Consider using the SplineInterpolatorSingle object directly if optimal performance for multiple interpolations based on the same dataset V is required.

Spline interpolation requires n >= 4, i.e.: at least 4 elements in the working dimension of V.

Support for NaN values: spline interpolation performs interpolation by taking all values of V into account. What enables best smoothness properties on the other hand implies that any NaN value in V populate to all elements of the output. Therefore, one must ensure that no NaN values exist in V. Use cubic polynomial interpolation in interpn(InArraySingle, InCell, InCell, InterpolationMethod) for an alternative on data with NaN values.

[ILNumerics Interpolation Toolbox]

See Also


InterpolationInternal.splinepath(InArraySingle, InArraySingle, InArraySingle, InArraySingle, Int32)
InterpolationInternal.interp1(InArraySingle, NullableSingle, InArraySingle, InArraySingle, Int32, InterpolationMethod)
InterpolationInternal.interpn(InArraySingle, NullableSingle, InCell, InCell, InterpolationMethod)