This function outputs the average of the vector.
function average input Integer nin "Number of inputs"; input Real u[nin] "Input vector"; output Real y "Result"; end average;