1
$\begingroup$

Say I have a set of discrete acceleration data and want to integrate it to get a set of velocity data. How accurate is the cumtrapz (Cumulative trapezoidal numerical integration) integrator in MATLAB?

Does it follow that the more acceleration data I have (for whatever fixed timescale), the better results I'll get from cumptrapz?

$\endgroup$
2
  • 2
    $\begingroup$ look up the standard error estimates for the cumulative trapezoidal method (spoiler: for an uniform data grid with spacing $h$, the method is second order accurate, i.e., the error is ${\cal O}(h^2)$). if your acceleration data is non-uniformly spaced, have a look at this scicomp post. $\endgroup$
    – GoHokies
    Jun 11 '17 at 11:08
  • $\begingroup$ @GoHokies, consider converting your comment to an answer, as it certainly does answer this question completely. $\endgroup$
    – Anton Menshov
    Mar 23 '18 at 17:58

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.