What is the best non-linear least square fitting method that will parameter error in addition to parameters?
7 次查看(过去 30 天)
显示 更早的评论
Hi,
I have an array A,
A=[296/296 0.08485182/0.08485182
296/463 0.070180715/0.08485182
296/681 0.055920654/0.08485182
296/894 0.042669196/0.08485182
296/1098 0.03980615/0.08485182
];
now i have fitted array A to an objective function objfcn = @(b,x) b(1).*x.^b(2) + b(3).*x.^b(4); as below:
B0 = ones(4,1);
[B,rsdnrm] = fminsearch(@(b) norm(A(:,2) - objfcn(b,A(:,1))), B0);
fprintf(1, 'c_1 = %12.6f\nc_2 = %12.6f\nn_1 = %12.6f\nn_2 = %12.6f\n', B)
and i am satisfied with the fit. However, fminsearch method does not give errors on parameters (b(1),b(2),b(3),b(4)). I tried other methods such as ''lsqnonlin'' and "lsqcurvefit ", but they do not reproduce the same parameters that i obtain from fminsearch. I was wondering if anyone knows a robust nonlinear least square fit method that is able to estimate parameter error?
Thank you all
0 个评论
采纳的回答
Star Strider
2019-10-16
2 个评论
Star Strider
2019-10-17
My pleasure.
If you prefer the fminsearch parameter estimates, use those as the initial parameter estimates for nlinfit or fitnlm. You can do the same with ga (genetic algorithm) optimisation parameter estimates, that searches the entire parameter space for the best parameter estimates.
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Nonlinear Regression 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!