get the derivative with ode45
2 ビュー (過去 30 日間)
古いコメントを表示
Hello every one! I'm trying to solve a differential equation y' = f(t,y) with MATLAB ode45. Besides the original y, y' is also very useful to me. But I simply don't know how to get it. Is there any convenient method? Or what I can do is just to compute y in many point and use diff? Thank you very much!
0 件のコメント
回答 (1 件)
Jan
2011 年 8 月 1 日
ODE45 replies the arrays y(t_i) and t_i. You have defined the function y'=f(t, y). If f is defined such that it accepts vectors as input, getting y' should be trivial:
[t, y] = ode45(@f, ...)
yd = f(t, y)
参考
カテゴリ
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!