getting started with parameter estimation using lsqnonlin
8 次查看(过去 30 天)
显示 更早的评论
Hi. I am new to parameter estimation and modeling. I am going through the tutorials on the website and trying to use them for my own application now.
I made a function that looks like this and want to use lsqnonlin fit to identify the values of k.
function fitfunc(kinit)
t = [0 10 30 60 90 120 180 420];
k = zeros(1,length(t));
ra = zeros(1,length(t));
k(1) = kinit;
ra(1) = 0;
for i=2:length(t)
ra(i) = k(i-1) + ((k(i) - k(i-1))/(t(i)-t(i-1))) * (t(i) - t(i-1));
end
end
I used the optimization tool and specified the solver and used the trust region algorithm. I specified a function handle and a start point (0).
When I run this, I see:
Optimization running.
Objective function value: 0.0
Initial point is a local minimum.
Optimization completed because the size of the gradient at the initial point
is less than the selected value of the optimality tolerance.
I am likely making a lot of beginner mistakes - any guidance is appreciated.
0 个评论
回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Get Started with Optimization Toolbox 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!