I have a two-dimensional non-linear equations, and its non-zero solution is x = [45, 0.1].
given a start point at x0 = [100, 10], let FSOLVE solve the equations but fail, the reason is :
"fsolve stopped because it exceeded the function evaluation limit (the default value)"
However, I write codes applying Newton-Raphson Algorithm, and the running result shows the solution is found within 7 iterations.
So I'm confused why FSOLVE can't work in this case ?
M-files are attached to this post.

 채택된 답변

Matt J
Matt J 2014년 6월 5일

0 개 추천

You're simply not choosing an x0 close enough to the solution, and are getting stuck at a local min somewhere. When I choose x0 = [50 5], fsolve gives me the correct result no problem.

댓글 수: 3

bill chu
bill chu 2014년 6월 6일
Thanks for your reply.
Although the start point x0 = [100, 10] is not close enough to the solution, Newton-Raphson Algorithm can still give the right solution within 7 iterations while FSOLVE doesn't perform well in this case.
I'm confused about that.
Matt J
Matt J 2014년 6월 6일
편집: Matt J 2014년 6월 6일
Different algorithms generate different sequences of points. If local min are present, which minimum the sequence will be drawn to can be a very algorithm-dependent thing.
Generally, there is a capture region around any local solution point in which you can count on an algorithm to be drawn to that point. However the capture radius depends on the algorithm, the point, and the shape of the graph of the objective function around that point. If the initial point x0 doesn't lie in the capture radius of any solution, it will just bounce around in a very x0-dependent and algorithm-dependent way until it lands in some capture region.
bill chu
bill chu 2014년 6월 6일
Great answer! Thank you very much.

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 Numerical Integration and Differential Equations에 대해 자세히 알아보기

태그

질문:

2014년 6월 5일

편집:

2014년 6월 6일

Community Treasure Hunt

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

Start Hunting!

Translated by