Borrar filtros
Borrar filtros

How do i calculate velocity and acceleration from positional data

82 visualizaciones (últimos 30 días)
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?

Respuestas (2)

Adam Danz
Adam Danz el 13 de Mzo. de 2019
Editada: Adam Danz el 25 de Mzo. de 2019
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
Tsotonenome Djogbessi el 31 de Mzo. de 2022
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