- Use your (x,y,z) coordinates to calculate distance: pdist()
- Use your time stamps to calcuate duration between time stamps: diff(timestamps)
- Velocity is just distance/time so once you have distance, divide by the durations to get velocity.
- acceleration is the chnage in velocity divided by the change in time.
How do i calculate velocity and acceleration from positional data
82 views (last 30 days)
Show older comments
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?
0 Comments
Answers (2)
Adam Danz
on 13 Mar 2019
Edited: Adam Danz
on 25 Mar 2019
Here are suggestions as requested
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.
0 Comments
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!