Problems using function fsolve

조회 수: 1 (최근 30일)
Ana Carolina da Silva Pacheco
Ana Carolina da Silva Pacheco 2021년 5월 19일
답변: Alan Weiss 2021년 5월 19일
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