I want to solve a system of differential equations using ode45 , for (many) parameters in MATLAB to investigate the behavior of solutions with coefficients of the equation .I want to find the parameters for which the solution absolute value doesn't get larger than some given number . The script has a for loop and solves the system for given parameters one after another(in some limited time span (independent variable is time)) .
Now,my question is that "how can I set a condition on ode45 to "detect" automatically if the solution for some parameter gets larger than that (given) value", so I can automatically find those parameters for which the solution gets larger than the given value, by running the for loop once?