optimization of multiple parameters in 4th order Runga Kutta
2 views (last 30 days)
Show older comments
I am trying to model multiple serial and simultaneous kinetic reactions using a 4th order runga kutta. I have 8 parameters (rate constants) that need to be optimized. I am having limited success using lsqnonlin however it will not let me set the upper or lower bounds. I only need the values to remain positive. When I put in a value for the lower bounds it crashes. Is there a different optimization procedure I should use that would be better? This is what I have that is working to a limited degree. Thanks!!!
LB = [];
UB = [];
X0=[a,b,c,d,e,f,h,i];
OPTIONS = optimset('TolX',1e-50,'TolFun',1e-50);
[X,RESNORM,RESIDUAL,EXITFLAG,OUTPUT,LAMBDA] = lsqnonlin('optim_k',X0,LB,UB,OPTIONS);
a=X(1);
b=X(2);
c=X(3);
d=X(4);
e=X(5);
f=X(6);
h=X(7);
i=X(8);
[T,y] = ode45('RK4',tspan,y0);
0 Comments
Accepted Answer
Star Strider
on 8 Nov 2015
2 Comments
Star Strider
on 8 Nov 2015
That post fits rate constants for the equations solved by ode45 in the Monod kinetics functions.
I offer it as a guide in your coding your own system of equations and estimating your own rate constants from your data. It won’t help you unless you code your kinetic equations and implement them in ode45 correctly.
More Answers (0)
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!