ODE Event Location detecting events other than zero
6 ビュー (過去 30 日間)
古いコメントを表示
"Use event functions to detect when certain events occur during the solution of an ODE. Event functions take an expression that you specify, and detect an event when that expression is equal to zero. They can also signal the ODE solver to halt integration when they detect an event."
This section is taken from the "ODE Event location" documentation. My question is, whether there is a event function that is able to halt the integration when the expression is equal to a certain value(i.e not zero; <0 or >0)
Does such a function exist?
Thank you in advance!
0 件のコメント
採用された回答
Mischa Kim
2021 年 1 月 14 日
Hi Hariharan,
yes it is. You simply define a function that is equal to zero whenever your expression equals a certain value. For example, say you want to track x = 5. In the events function you then use, e.g. y = x - 5. So whenever a zero is detected (y = 0), by definition you know that x = 5.
その他の回答 (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!