fsolve terminate far before finding answer when using TolFun option. I wrote a simple code to show my problem:
======================================
clcclearOpt=optimoptions('fsolve','Tolfun',1);x0=10;x_solution=fsolve(@fff,x0,Opt);function y=fff(x)y=x^2;end
=========================
x_solution=6.5
6.5^2=42.5 and is far from (Tolfun=1)
Can anyone help me to know how should I solve this issue. Thanks a lot
Best Answer