How is the residual in lsqnonlin calculated?

4 次查看(过去 30 天)
Does anyone know how's the residual being calcualted in lsqnonlin function?
I am interested to know the formula.
Is it : res = sum(fun(x).^2) at x?
Where fun is the function you are trying to minimize.
  2 个评论
Torsten
Torsten 2019-4-2
编辑:Torsten 2019-4-2
5th line from above under
But as a user of lsqnonlin, you have to supply the residual vector as
res(i) = f_i(x)
where f_i(x) is the i-th function you want to zeroize.
John D'Errico
John D'Errico 2019-4-2
Exactly. lsqnonlin does not calculate any residual. YOU calculate it, and return that to lsqnonlin, via your objective function.

请先登录,再进行评论。

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Linear and Nonlinear Regression 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by