optimization of multiple parameters in 4th order Runga Kutta
이전 댓글 표시
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개)
카테고리
도움말 센터 및 File Exchange에서 Chemistry에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!