- 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
8 views (last 30 days)
Show older comments
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 Comment
Steven Lord
on 31 Mar 2023
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?
Answers (1)
See Also
Categories
Find more on Ordinary Differential Equations in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!