Question: what is cumtrapz command in matlab?
Answer: Q = cumtrapz( Y ) computes the approximate cumulative integral of Y via the trapezoidal method with unit spacing. ... If Y is a matrix, then cumtrapz(Y) is the cumulative integral over each column. If Y is a multidimensional array, then cumtrapz(Y) integrates over the first dimension whose size does not equal 1.