Computes the coefficients of a polynomial that fits a set of data points in a least-squares sense
function fitting extends Modelica.Icons.Function; input Real u[:] "Abscissa data values"; input Real y[size(u, 1)] "Ordinate data values"; input Integer n(min = 1) "Order of desired polynomial that fits the data points (u,y)"; output Real p[n + 1] "Polynomial coefficients of polynomial that fits the date points"; end fitting;