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
    Commented Nov 4, 2019 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
    Commented Nov 5, 2019 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$
    – Jae H
    Commented Nov 6, 2019 at 0:32

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.