- 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 次查看(过去 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?
0 个评论
回答(2 个)
Adam Danz
2019-3-13
编辑:Adam Danz
2019-3-25
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 个评论
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!