VPInterpolation interp1 Method (IList Double , IList Double , IEnumerable Double )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<double> interp1(
	IList<double> x,
	IList<double> y,
	IEnumerable<double> xs
)

Parameters

x
Type: OnlineSystem.Collections.Generic IList OnlineDouble 
The known independent values
y
Type: OnlineSystem.Collections.Generic IList OnlineDouble 
The known dependent values
xs
Type: OnlineSystem.Collections.Generic IEnumerable OnlineDouble 
Value to at which to interpolate

Return Value

Type: OnlineIEnumerable OnlineDouble 
If xs outside range of x, returns NaN, otherwide, returns linearly interpolated result
See Also