Problems using function fsolve

1 次查看(过去 30 天)
I'm trying to execute a fsolve function. First, I tried without using optimset and it went wrong because of maximum function evaluations and maximum iterations. So I rewrote the code as:
funm = @dissertacao_momento_funcao;
x0m = [1;1];
options = optimset('MaxFunEvals',1e5,'MaxIter',1e5);
xm = fsolve(funm,x0m,options);
But now it's returning the error below:
No solution found.
fsolve stopped because the relative size of the current step is less than the
default value of the step size tolerance squared, but the vector of function values
is not near zero as measured by the default value of the function tolerance.
<stopping criteria details>
I tried to set TolFun and TolX as 1e-15 but it didn't solve the problem. After I did it, it returned the same error and some of the times I ran the code it returned a different error:
No solution found.
fsolve stopped because the problem appears to be locally singular.
<stopping criteria details>
Can anybody help me, please?

回答(1 个)

Alan Weiss
Alan Weiss 2021-5-19
Check the suggestions in fsolve Could Not Solve Equation.
Alan Weiss
MATLAB mathematical toolbox documentation

类别

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