VPInterpolation interp1 Method (IList Single ,  Single , IEnumerable Single , Int32, Int32)Virtual Photonics - VTS Library
Virtual Photonics
Interpolation in one dimension within a 2-dimensional array of values

Namespace: Vts.Common.Math
Assembly: Vts (in Vts.dll) Version: 1.0.12.0 (1.0.12)
Syntax

public static IEnumerable<float> interp1(
	IList<float> x,
	float[,] y,
	IEnumerable<float> xs,
	int fixedDimension,
	int fixedIndex
)

Parameters

x
Type: OnlineSystem.Collections.Generic IList OnlineSingle 
The known independent value
y
Type:  OnlineSystem Single 
The known dependent value
xs
Type: OnlineSystem.Collections.Generic IEnumerable OnlineSingle 
Value to at which to interpolate
fixedDimension
Type: OnlineSystem Int32
The dimension of y in which to interpolate
fixedIndex
Type: OnlineSystem Int32
The index within the dimension of y in which to interpolate

Return Value

Type: OnlineIEnumerable OnlineSingle 
If xs outside range of x, returns NaN, otherwide, returns linearly interpolated result as an IEnumerable of type float
See Also