Fsolver is not finding solution
2 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
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 comentarios
Respuestas (1)
Torsten
el 10 de Abr. de 2015
Plot your function and you will see that it has no zero.
Best wishes
Torsten.
0 comentarios
Ver también
Categorías
Más información sobre Systems of Nonlinear Equations en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!