MATLAB: How to change maxfun evals in fsolve ‘levenberg-marquardt’ algorith.

algorithmdsge

I am using f solve to get the solution of a non linear system equation but i get the error:
Solver stopped prematurely.
fsolve stopped because it exceeded the function evaluation limit,
options.MaxFunEvals = 3500 (the default value).
I am trying to manual change the limit by coding:
options = optimoptions(@fsolve,'Algorithm','levenberg-marquardt','MaxFunEvals',15000)
as per manual but with no luck.
Can you help me? Morevoer is is "bad sign" for the stability of the system that the itterations are not enough to solve it?

Best Answer

You have not shown us your call to fsolve as Walter requested, but I suspect that you forgot to pass "options" to fsolve when you actually called it. The code should look like this,
Related Question