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!