- If you're using this to try to identify parameters for the system, reject the set of parameters you're currently simulating. If your predator birth rate in a predator-prey system model results in a point where there are -1 predators around, that's not physically realizable.
- Apply some sort of correction to the system. One way to do this is with an Events function. See for example the ballode example, which uses an event function to detect when the ball has struck the ground. It then modifies the state of the system to reflect the ball bouncing and starts solving from that point with the modified system.
- Modify your system from the start. Perhaps some factor that you thought you could safely neglect isn't quite as negligible as you thought. For example, in a simple ballistics problem in an introductory physics class you can often ignore the wind. That's not necessarily the case if you're trying to fire a projectile into the eye of a hurricane to study it.
Setting solution bounds in ode45
12 ビュー (過去 30 日間)
古いコメントを表示
Hello -
I have a system of 8 coupled ODEs. For one of the variables, I know that the solution should stay within a minimum and maximum value in order to be physiological. Is there a way for me to force the solution to stay without some bounds?
Thanks You,
Vitaly
1 件のコメント
Steven Lord
2023 年 3 月 31 日
How do you want to handle the situation where the solution is set to exceed the bounds you've set? I can think of several possible approaches:
What approach do you want to use?
回答 (1 件)
参考
カテゴリ
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!