Find interval for piecewise linear interpolation
function findInterval extends Modelica.Icons.Function; input SI.MagneticFieldStrength Xk[:] "Nodes"; input SI.MagneticFieldStrength x "Value to find interval"; output Integer k "Interval Xk[k-1]..Xk[k]"; end findInterval;