Approximate derivative within ODE function.
古いコメントを表示
Hi, I am solving a pretty big system of differential equations using 'ode15s'. Within the ODE function, I would like to calculate the second derivative of a variable for which I don't have an analytical expression (even though I know its first derivative). I wonder if there's any possible way to calculate an approximate second derivative for that variable, considering that this last appears in other model's equations.
Thanks in advance, Davide
1 件のコメント
Star Strider
2017 年 11 月 13 日
Davide Masiello’s follow-up Comment to my (now deleted) Answer:
I need to calculate the second derivative in the ODE function script because it appears as a member of other equations constituting the model, as in the following example:

where the second derivative of x is not given to know analytically. In the past, I used to stop the integration at a fixed and arbitrarily small time step to calculate the approximate derivative and then keep integrating with the last calculated value as new initial one, but I'd like to avoid this as the code runs correctly only with a varying step size. That's why I am wondering whether there's a more elegant solution to this problem.
採用された回答
その他の回答 (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!