Getting the accelerations (or 2nd time derivative) from ODE solver
Show older comments
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 Comment
Pedro Calorio
on 9 Mar 2021
Accepted Answer
More Answers (0)
Categories
Find more on Ordinary Differential Equations in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!