Getting the accelerations (or 2nd time derivative) from ODE solver
Mostrar comentarios más antiguos
Hi guys, My name is Pedro Calorio and I'm an engineering student who works with vehicle dynamics.
My question is rather basic, but I'm still stuck to it. Who do I get the accelerations from the ode solvers? I know that the ode family of MATLAB cannot handle 2nd order equations, so the solution to it is to broke a 2nd order system into 1st order by adding variables. But when I create a function with my two equations that are a 1st order equation, when I call the ode solver to solve it, I get the displacement and velocities, but not the acceleration.
The solution to this that I came up with was to apply diff() function into the velocities that I got from the ODE solver to get the accelerations. But it doesn't feel right and I believe there is a better way for dealing with this.
Can anybody help me with this?
1 comentario
Pedro Calorio
el 9 de Mzo. de 2021
Respuesta aceptada
Más respuestas (0)
Categorías
Más información sobre Ordinary Differential Equations en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!