VPInterpolation interp1 Method (IList Single , IList Single , IEnumerable Single )Virtual Photonics - VTS Library
Virtual Photonics
Interpolation in one dimension (assumes x are monotonically increasing)

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,
	IList<float> y,
	IEnumerable<float> xs
)

Parameters

x
Type: OnlineSystem.Collections.Generic IList OnlineSingle 
The known independent values
y
Type: OnlineSystem.Collections.Generic IList OnlineSingle 
The known dependent values
xs
Type: OnlineSystem.Collections.Generic IEnumerable OnlineSingle 
Value to at 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