- 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!