Calculates a value y for a given value x based on discrete tuple of values
function interpol input Real x "Independent value"; input Real tabX[:] "Discrete independent value list"; input Real tabY[:] "Discrete dependent value list"; input Integer mode "1: linear interpolation; 2: exponential interpolation"; output Real y "dependent value"; end interpol;