Velocity graph from position graph

5 visualizaciones (últimos 30 días)
MeEngr
MeEngr el 22 de En. de 2015
Editada: khaled elmoshrefy el 14 de Mayo de 2020
Dear all,
I have a graph of the position of a body vs. time. It's actually two graphs. One for the x-position and one for the y-position.
I now need to plot the velocity of the body vs. time. It will be two graphs again. One for the velocity along the x direction and one for the velocity along the y-direction.
What would be the best way (i.e. the method that yields the most accurate result) to do this? Should I use diff() or gradient()? I would very much appreciate any advice. Thanks!

Respuesta aceptada

Star Strider
Star Strider el 22 de En. de 2015
I would use gradient for each x and y, and if it applies to your application, hypot, since that will give you the net position or velocity at each time if you need that.
  3 comentarios
Star Strider
Star Strider el 22 de En. de 2015
My pleasure!
khaled elmoshrefy
khaled elmoshrefy el 14 de Mayo de 2020
Editada: khaled elmoshrefy el 14 de Mayo de 2020
how can i implement that?

Iniciar sesión para comentar.

Más respuestas (0)

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by