lsqnonlin - how to return the best fit
显示 更早的评论
I am fitting a function nonlinearly using the lsqnonlin function. I have used the [x, res] to return the parameters (i.e. x) and the residual (i.e. res).
I am wondering if there is any way to return the best fit of the objective function instead of returning only the parameters and the residual.
Thanks in advanced.
回答(1 个)
Torsten
2018-3-16
0 个投票
Just call the objective function with the x-vector of optimal paramters. It will return the best fit.
Best wishes
Torsten.
类别
在 帮助中心 和 File Exchange 中查找有关 Get Started with Curve Fitting Toolbox 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!