How to solve singularity problem while using fsolve
显示 更早的评论
Hi,I am trying to solve for x in a equation using fsolve. Below is the code and equation:
a = 0.1886;
b = 0.6886;
c = 1.1886;
m = 0.31372;
x0 = 0.1;
F = @(x)[(((x-a)/(x-c))^(m))+((x-a)/(x-b))];
options = optimset('Display','iter','MaxFunEvals',1e20,'TolFun',2e-50,'TolX',2e-50);
[xd, fval, exitflag, output]= fsolve(F, x0, options)
However, I am getting 'No solution found' with a message: fsolve stopped because the problem appears to be locally singular. I have tried changing the options parameters and initial guess still getting same output. Any help is appreciated.
Thanks, KB
采纳的回答
更多回答(1 个)
Walter Roberson
2016-5-26
x = 943/5000
The equation is exactly 0 at that point, which corresponds to x = a . However, there is no zero crossing because it goes imaginary until x = c at which point it slopes down from infinity towards 2 (and so never crosses 0 for greater x either)
类别
在 帮助中心 和 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!