MATLAB Answers

Lsqnonlin_Fitting Data

1 ビュー (過去 30 日間)
Fredic
Fredic 2020 年 10 月 8 日
コメント済み: Fredic 2020 年 10 月 11 日
Hello Guys!!
I am performing a fitting of different curves using lsqnonlin. My fitting equation is composed of six parameters. When I run my script I obtained one set of parameters for each curve.
It is possible to perform the fitting using only one set of parameters for each curve??
In the attachment my script:
x0 = [10.07 5.89 21.62 0.116 0.493 47.99];
coeff = zeros(6,mm);
LB=[0 0 0 0 0 0];
UB=[inf inf inf 1 0.5 90];
sig_fit_11 = zeros(nn,mm);
sig_fit_22 = zeros(nn,mm);
for i=1:mm
options = optimoptions(@lsqnonlin,'Algorithm','trust-region-reflective');
[x,resnorm,residual,exitflag]=lsqnonlin(@(x)f_const(Lam11(:,i), Lam22(:,i), x) - [sigma11(:,i); sigma22(:,i)],x0,LB,UB,options);
coeff (:,i) = x;
sigma = f_const(Lam11(:,i), Lam22(:,i), x);
sig_fit_11(:,i) = sigma(1:nn);
sig_fit_22(:,i) = sigma((nn+1):end);
end
I look forward to your reply!!!
Thank you very much

回答 (1 件)

Alex Sha
Alex Sha 2020 年 10 月 8 日
Hi, if possible, please post out your data of each curve, as well as the fitting equation.
  4 件のコメント
Fredic
Fredic 2020 年 10 月 11 日
do you have an idea?

サインインしてコメントする。

Community Treasure Hunt

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

Start Hunting!

Translated by