How is the residual in lsqnonlin calculated?

조회 수: 5 (최근 30일)
Gina Carts
Gina Carts 2019년 4월 2일
댓글: John D'Errico 2019년 4월 2일
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에서 Interpolation에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by