ODE45- How to pass parameters out
6 ビュー (過去 30 日間)
古いコメントを表示
Hi, Can anyone tell me how I can pass parameters out of a ODE when they are not being calculated as part of the differential equation but are subsidiary values. Wha I want to do is write them out at the end of a successful timestep (i.e. not get the values calculated with trial time step sizes)?
Is there a clever way to use global to do this?
0 件のコメント
回答 (1 件)
Richard Brown
2012 年 5 月 2 日
Why don't you just solve your ODE first, and then call the RHS function, modified to print out your parameters of interest, at the timestep values?
1 件のコメント
Jan
2012 年 5 月 3 日
There is no reliable way to check inside the ODE function, if a step is a trial or accepted step. Function evaluations can be used to find event values also.
参考
カテゴリ
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!