How do i calculate velocity and acceleration from positional data

82 次查看(过去 30 天)
I have a data set with x, y and z coordinates. Any suggestions of setting up a script for calculating velocity and acceleration in each direction at each timestamp?

回答(2 个)

Adam Danz
Adam Danz 2019-3-13
编辑:Adam Danz 2019-3-25
Here are suggestions as requested
  1. Use your (x,y,z) coordinates to calculate distance: pdist()
  2. Use your time stamps to calcuate duration between time stamps: diff(timestamps)
  3. Velocity is just distance/time so once you have distance, divide by the durations to get velocity.
  4. acceleration is the chnage in velocity divided by the change in time.
Resources like these are great to get you started: https://www.wikihow.com/Calculate-Acceleration
These calculations will give you the net distance, net velocity, and net acceleration. If you need to split those up into directional components in the x, y, z directions, you'll need to apply basic trig which gets a little more complicated. Your question is general so my suggestions are as well. If you get stuck with something specific you could follow up here or ask a new question.

Tsotonenome Djogbessi
how do you calculate velocity

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by