Example:
arithmetic({1,2,3})
returns 2.
function arithmetic extends Modelica.Icons.Function; input Real u[:] "Vector of numbers" annotation( Dialog(__Dymola_label = "<html><i>u</i></html>")); output Real mean "Arithmetic mean"; end arithmetic;