Fsolver is not finding solution
2 ビュー (過去 30 日間)
古いコメントを表示
I am trying to test out fsolve for the first time by solving this equation for which I already know it should output around .045 (from a different solver). But I keep getting
''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 default value of the function tolerance.''
Any input?
Code:
lambda=1;
alpha=40;
p=.1;
F = @(V) 1-V-lambda-lambda*p*(exp(1)^(alpha*V)-1)+lambda*(exp(1)^(alpha*V)*sqrt(1+lambda*alpha*p*exp(1)^(alpha*V))/(sqrt(2*alpha*pi)));
InitialGuess = .04;
Options = optimset('Display','iter');
XY = fsolve(F, InitialGuess, Options);
0 件のコメント
回答 (1 件)
Torsten
2015 年 4 月 10 日
Plot your function and you will see that it has no zero.
Best wishes
Torsten.
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Systems of Nonlinear Equations についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!