How to stop, reset the variables and restart an ODE solver?

5 ビュー (過去 30 日間)
VR
VR 2019 年 4 月 3 日
コメント済み: VR 2019 年 4 月 18 日
I am trying to solve a system of equations in which I want to stop the solver at certain t-values, reset the value of depenedent variables, and restart the solver. Is there an example that I can look at and try to mimic?

回答 (1 件)

Walter Roberson
Walter Roberson 2019 年 4 月 3 日
Look at ballode and how it uses "events", and observe how it loops calls until the entire time is complete.
  5 件のコメント
VR
VR 2019 年 4 月 18 日
Thanks but I had already looked at it. I still don't understand how I can adapt the following line so that it stops integrating at t=6 and replace dydt(2) to be 40 (say) and starts integrating again.
value = y(1);
I tried to replace it with the following but it doesn't seem to work.
value = t-6;

サインインしてコメントする。

カテゴリ

Help Center および File ExchangeOrdinary Differential Equations についてさらに検索

タグ

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by