Why do I get no solution found in Fsolve despite the results match my nonlinear equations ?

28 ビュー (過去 30 日間)
Hi All
I am solving a set of Non Linear equations. when I put the solution results in each of my equations, the result is zero or very close to zero ( 1e-15 as residual)
the options I use :
options = optimoptions(@fsolve,'Display','iter','MaxFunEvals',1e6,'MaxIter',1e6,'TolFun',1e-1,'DerivativeCheck','on','Diagnostics','on');
but on the message board I get the no solution found, that does not change with any tolerance value :
Here I put a copy of the last iterations and the message :
23 72 1.44467e+07 0.000238419 1.4 0.000238
24 73 1.44467e+07 0.000238419 1.4 0.000238
25 77 1.44467e+07 5.96046e-05 0.325 5.96e-05
26 78 1.44467e+07 5.96046e-05 0.325 5.96e-05
27 82 1.44467e+07 1.49012e-05 0.147 1.49e-05
28 86 1.44467e+07 1.49012e-05 0.0306 1.49e-05
No solution found.
fsolve stopped because the problem appears regular as measured by the gradient,
but the vector of function values is not near zero as measured by the
selected value of the function tolerance.
fsolve stopped because the sum of squared function values, r, has gradient with
relative norm 3.057666e-02; this is less than options.OptimalityTolerance = 1.000000e-01.
However, r = 1.444675e+07, exceeds sqrt(options.FunctionTolerance) = 3.162278e-01.
Optimization Metric Options
norm(grad r) = 3.06e-02 OptimalityTolerance = 1e-01 (selected)
r = 1.44e+07 sqrt(FunctionTolerance) = 3.2e-01 (selected)
  16 件のコメント
farzad
farzad 2019 年 7 月 8 日
@Bruno
is it an impossible question
farzad
farzad 2019 年 7 月 8 日
please check my comment in Matt J answer

サインインしてコメントする。

採用された回答

Matt J
Matt J 2019 年 7 月 7 日
編集済み: Matt J 2019 年 7 月 7 日
You're asking for guesses? Because you are not plugging the solution into the same equations that were given to fsolve. fsolve thinks you have a residual norm of sqrt(1.44e+07).
  34 件のコメント
farzad
farzad 2019 年 7 月 8 日
@Matt J
why do you avoid checking my last report where I have a small fun(x)
and a big error
they are not telling the same thing
farzad
farzad 2019 年 7 月 8 日
Sorry
I was doing something wrong
I had two fsolve loops
and I was reporting the error of the second one for the first one
sorry !
my mistake

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeSolver 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