Using fmincon to optimize parameters in an ODE
显示 更早的评论
Hello
I am trying to optimize the following ODE
dV/dT = (p1/B)(exp(-p2/T))(p3-V)
Here, B is a known constant. p1, p2 and p3 are the variables to be optimized.
So I first created function files for the function and the ode as follows.


My objective function is as follows

Initially i used 'lsqnonlin' but it did not give the expected graph. So next, I used the 'fmincon' solver for the optimization. This is the code for the optimization.
V0 = 0.0016; B= 5000;
lb=[1e10,1,0];ub=[1e20,1e20,1];p0=[1e10,100,0.5];
A=[];b=[];Aeq=[];beq=[];nlcon=[];
p_soln=fmincon(@objective,p0,A,b,Aeq,beq,lb,ub,nlcon);
But the results when plotted are not as expected.

Please help me identify what could have gone wrong and suggestions on how to correct it
Thank You!
回答(0 个)
类别
在 帮助中心 和 File Exchange 中查找有关 Solver Outputs and Iterative Display 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!