This function returns the largest element of the Complex input vector, defined by the Complex absolute.
function max extends Modelica.Icons.Function; input Complex v[:] "Vector"; output Complex result "Element of v with largest absolute value"; output Integer index "v[index] has the largest absolute value"; end max;