0
$\begingroup$

I have been trying to use cumtrapz function to integrate velocity at a given time interval to get the position. However, it keeps giving me zero position at the beginning and end of the iteration, which is not what I expect. Can anyone help? Thank you

$\endgroup$
3
  • $\begingroup$ Would be easier if you provide the data and your script/ $\endgroup$ – FooTheBar Nov 4 '19 at 15:45
  • $\begingroup$ it keeps giving me zero position at the beginning and end of the iteration - It only returns one value, the cumulative integral, so I don't understand what you mean when you say it gives you zero at the beginning and end. As @FooTheBar mentioned, it would be helpful to see your code. $\endgroup$ – Chuck Nov 5 '19 at 5:13
  • $\begingroup$ The interval can be divided into n and integrate along that sampling time gives the integral for that particular interval. $\endgroup$ – Raul Nov 6 '19 at 0:32

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.