Detecting steady-state by calculating ODE values in ODE function in Matlab
问题 I have a system of ODE equations which I want to solve, but there is a tricky part that when the system reaches steady-state, I would like to change the value of one (or more) parameters. For example, consider the following: function dydt = diff(t,x,params) F = params(1); G = params(2); dydt = zeros(2,1); dydt(1) = F*x(1) - G*x(1)*x(2); dydt(2) = (F-G)*x(2); end I would like my code to work such that when the system has reached steady-state, the value of F is changed to 10 and the value of G