MATLAB: Warning when runing fsolve

fsolvelevenberg marquardttrust-region-dogleg

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!

Best Answer

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: