Warning when runing fsolve

조회 수: 23 (최근 30일)
Fan
Fan 2013년 2월 3일
When I run fsolve, there's a warning:
Warning: Trust-region-dogleg algorithm of FSOLVE cannot handle non-square systems; using Levenberg-Marquardt algorithm instead.
> In fsolve at 303
Solver stopped prematurely.
fsolve stopped because it exceeded the function evaluation limit, options.MaxFunEvals = 1000 (the default value).
How can I fixed that? Thank you!

채택된 답변

Shashank Prasanna
Shashank Prasanna 2013년 2월 3일
The Warning is acceptable. If you are running the code I gave you, you already know it is not a SQUARE system.
As with all iterative problems, you will have to play around with Tolerances to achieve the results you want. Relax the MaxFunEvals that Walter mentioned using OPTIMSET:
I really really advise you read this since you are new to optimization in MATLAB:
  댓글 수: 3
Shashank Prasanna
Shashank Prasanna 2013년 2월 4일
options=optimset('Algorithm','Levenberg-Marquardt');
please see the documentation on optimset
Fan
Fan 2013년 2월 5일
Thank you very much!

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

추가 답변 (1개)

Walter Roberson
Walter Roberson 2013년 2월 3일
Pass in an options structure that indicates the algorithm and MaxFunEvals that you want to use.
  댓글 수: 1
Fan
Fan 2013년 2월 4일
Thank you very much for your suggestion and sorry for the late reply.
But could you tell me how can I change the algorithm to Levenberg-Marquardt algorithm if I want to see the difference between them?

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

카테고리

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

Community Treasure Hunt

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

Start Hunting!

Translated by