Issue with fsolve tolerance

조회 수: 9 (최근 30일)
Mohit Kumar
Mohit Kumar 2020년 5월 10일
답변: Mohit Kumar 2020년 5월 10일
I am using fsolve to solve an overdetermined system of equations using the levenberg marquadt algorithm.
It works fine although giving the message "Equation solved, fsolve stalled." This is fine for 90% of my cases.
However, for particular systems of equations, my function value that is returned (fval) after saying that the equation is solved (with fsolve stalled) is
0.009486931983140
-0.035516210533842
-0.019252250306780
which is unacceptable for my need.
Since the default function tolerance is 1e-6, why does it accept this as a solution?

채택된 답변

Mohit Kumar
Mohit Kumar 2020년 5월 10일
Turns out function tolerance is compared with norm(fval)^2and the default tolerance was 1e-3. Simply changed it to 1e-10 (in accordance with my need) and its working well.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Solver Outputs and Iterative Display에 대해 자세히 알아보기

제품


릴리스

R2019a

Community Treasure Hunt

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

Start Hunting!

Translated by