ode45 - Does matlab keep track of derivatives which can be recalled?
1 回表示 (過去 30 日間)
古いコメントを表示
I've run into an issue with a system of coupled 2nd order nonlinear ODEs. I've converted the system to a system of 1st order ODEs like normal, but its not in the format that ode45 requires. ode45 requires
x_dot = f(t,x), where x is the state vector
My form is
x_dot = f(t,x,x_dot)
where the function also depends on the derivative. I searched all around to see if anyone else has had this issue, and only found one post on a forum. It just said to proceed normally with ode45 and use the old values (previous step) of x_dot to calculate the rhs.
This makes sense, but ode45 doesn't work that way (not that I know of). I only have access to the old state values and not their derivatives.
Any ideas?
0 件のコメント
採用された回答
Babak
2013 年 5 月 1 日
Re-formulate your equations from
x_dot = f(t,x,x_dot)
to
g(t,x,x_dot) = f(t,x,x_dot) - x_dot = 0
and then use
ode15i
to integrate the set of equations in g().
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Ordinary Differential Equations についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!