getting started with parameter estimation using lsqnonlin

8 ビュー (過去 30 日間)
Hikaro Matsu
Hikaro Matsu 2017 年 10 月 17 日
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 件)

カテゴリ

Help Center および File ExchangeGet Started with Optimization Toolbox についてさらに検索

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by