function inty = cumint(y,dx)
% function inty = cumint(y,dx)
% Integral of y dx from x1 to x1, x1+dx, ... x2 where y is tabulated
% values at these points.
% Trapezoidal integration

inty = dx*( cumsum(y) - 0.5*y - 0.5*y(1) );

