Getting the accelerations (or 2nd time derivative) from ODE solver
古いコメントを表示
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?
採用された回答
その他の回答 (0 件)
カテゴリ
ヘルプ センター および File Exchange で Ordinary Differential Equations についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!