function sortDown extends Modelica.Icons.Function; input Real[:] x "x unsorted"; output Real[size(x, 1)] y "x sorted decreasing"; output Integer[size(x, 1)] i "indizes of sorted x"; end sortDown;