MonoCubicInterp(xi, yi, x, i)
Given arrays of numerical coordinates «xi» and «yi», indexed by «i», it returns the value of the interpolated function at «x». The values in both «xi» and «yi» must be monotonically increasing. The interpolation performed is a type of cubic spline that preserves the monotonicity of the resulting function with a continuous derivative. A standard cubic spline does not guarantee that the interpolated function is monotonic, even if the data points are.
The derivative is continuous at each data point, and the derivative obtained at the first and last data point are used to extrapolate when «x» is outside the range of «xi».