What does this "fsolve" message tell me?
조회 수: 2 (최근 30일)
이전 댓글 표시
I used fsolve for solving a set of AEs system, but at some points, there was a message (below) and I want to make sure that the solution is correct. Does a function evaulation error of (5.95853e-15 ) is not enough for the solution to be correct? if yes, why then there is a possibality of inaccuracy? Is there any site that gives an example and clarifies the answer (the solution correct or not)?
Thank you for your reply.
Equation solved, inaccuracy possible.
The vector of function values is near zero, as measured by the selected value
of the function tolerance. However, the last step was ineffective.
<stopping criteria details>
Norm of First-order
Iteration Func-count f(x) step optimality
0 25 283.369 889
1 50 17.5264 1.69221 115
2 75 0.919449 5.70997 14.9
3 100 0.031813 0.655703 1.82
4 125 0.000288599 0.469084 0.138
5 150 5.08518e-06 0.0216549 0.00152
6 175 1.26756e-08 0.0215894 0.000155
7 200 2.40321e-10 0.000338267 1.54e-06
8 225 4.66879e-13 0.000144072 1.54e-06
9 250 5.95853e-15 1.48907e-06 2e-08
댓글 수: 0
채택된 답변
Matt J
2019년 6월 15일
편집: Matt J
2019년 6월 15일
Does a function evaulation error of (5.95853e-15 ) is not enough for the solution to be correct?
Only you can know the answer to that. How close to the ideal solution do you need to be? And how sensitive is your equation function f(x) to deviations from the ideal solution.
Consider, for example, the simplest equation
1e-15*x-1e-15=0
The ideal solution to this is x=1, but x=2 provides a solution with error of only f(x)=1e-15. Is x=2 close enough?
Now consider an equivalent equation
x-1=0
Here again, the solution is x=1, but x=2 provides a much bigger error, f(x)=1. Again, does f(x) tell you it is close enough, or still too far away?
댓글 수: 2
Matt J
2019년 6월 15일
편집: Matt J
2019년 6월 15일
Equation solved, inaccuracy possible.
I assume this is supposed to warn you of the same issue as in my example above. fsolve succeeded in making f(x) very small, as measured by the FunctionTolerance you selected. However, as my example showed, just because f(x) is very small that doesn't automatically mean that is very small. It depends on the scaling and sensitivity of f(x) to changes in x.
What does “last step was ineffective” mean?
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Ordinary Differential Equations에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!