Integral of a time signal using trapezium rule
function trapz extends Modelica.Icons.Function; input Real[:] T "Time vector"; input Real[size(T, 1)] X "Values vector"; output Real Y "Integral"; end trapz;