Problems using function fsolve
5 views (last 30 days)
Show older comments
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?
0 Comments
Answers (1)
See Also
Categories
Find more on Symbolic Math Toolbox in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!