Trust-Region Dogleg Method - what do I do?

조회 수: 10 (최근 30일)
john birt
john birt 2011년 3월 18일
Im trying to solve two equations with two unknowns, however it come back saying "No solution found, fsolve stopped because the problem appears to be locally singular."
then the link says "For more information, see Trust-Region Dogleg Method."
My code is
options = optimset('Display','iter','TolFun',1e-22, 'MaxFunEvals', 1000000, 'MaxIter', 1000000, 'TolX', 0.0000000000000000000000001);
x0 = [-0.002; 5;];
[x,fval] = fsolve(@moments5,x0,options)
But the help files say that fsolve uses the "Trust-Region Dogleg Method" by default.
So is there nothing more I can do? Am I already using the T-R Dogleg Method? I really need to solve these equations.
my m file is
function F = moments5(x)
F = [ (3*(0.00004503498440459510 - ((-0.00021667822379937900 - x(1))/x(2)))/x(2)) + (6*(-0.00000020584663788071 - (3*(0.00004503498440459510 - ((-0.00021667822379937900 - x(1))/x(2) ))/x(2)))/x(2) ) - (((-0.00000020584663788071*x(2)^2 - 0.00004503498440459510 *x(2))/(2*(-0.00000020584663788071)*x(2)^2 - 7*0.00004503498440459510 *x(2) - 3*(-0.00021667822379937900 - x(1)))) - 3)* x(2)*(2*(-0.00000020584663788071 - (3*(0.00004503498440459510 - ((-0.00021667822379937900 - x(1))/x(2) ))/x(2))))*((-0.00000020584663788071 - 3*(0.00004503498440459510 - ((-0.00021667822379937900 - x(1))/x(2) ))/x(2) )/(-2*(((-0.00000020584663788071*x(2)^2 - 0.00004503498440459510*x(2))/(2*(-0.00000020584663788071)*x(2)^2 - 7*0.00004503498440459510 *x(2) - 3*(-0.00021667822379937900 - x(1)))) - 2)*x(2)*(0.00004503498440459510 - ((-0.00021667822379937900 - x(1))/x(2) )))) - 0.00000001777307772116 ;
15*(-0.00000020584663788071 - (3*(0.00004503498440459510 - ((-0.00021667822379937900 - x(1))/x(2) ))/x(2)))/x(2)^2 - (((-0.00000020584663788071*x(2)^2 - 0.00004503498440459510 *x(2))/(2*(-0.00000020584663788071)*x(2)^2 - 7*0.00004503498440459510 *x(2) - 3*(-0.00021667822379937900 - x(1)))) - 3)* (20*(-0.00000020584663788071 - (3*(0.00004503498440459510 - ((-0.00021667822379937900 - x(1))/x(2) ))/x(2))))*((-0.00000020584663788071 - 3*(0.00004503498440459510 - ((-0.00021667822379937900 - x(1))/x(2) ))/x(2) )/(-2*(((-0.00000020584663788071*x(2)^2 - 0.00004503498440459510 *x(2))/(2*(-0.00000020584663788071)*x(2)^2 - 7*0.00004503498440459510 *x(2) - 3*(-0.00021667822379937900 - x(1)))) - 2)*x(2)*(0.00004503498440459510 - ((-0.00021667822379937900 - x(1))/x(2) )))) + (-4 + ((-0.00000020584663788071*x(2)^2 - 0.00004503498440459510 *x(2))/(2*(-0.00000020584663788071)*x(2)^2 - 7*0.00004503498440459510 *x(2) - 3*(-0.00021667822379937900 - x(1))))) *(-3 + ((-0.00000020584663788071*x(2)^2 - 0.00004503498440459510 *x(2))/(2*(-0.00000020584663788071)*x(2)^2 - 7*0.00004503498440459510 *x(2) - 3*(-0.00021667822379937900 - x(1)))))*x(2)^2*(4*(-0.00000020584663788071 - (3*(0.00004503498440459510 - ((-0.00021667822379937900 - x(1))/x(2) ))/x(2))) )*((-0.00000020584663788071 - 3*(0.00004503498440459510 - ((-0.00021667822379937900 - x(1))/x(2) ))/x(2) )/(-2*(((-0.00000020584663788071*x(2)^2 - 0.00004503498440459510 *x(2))/(2*(-0.00000020584663788071)*x(2)^2 - 7*0.00004503498440459510 *x(2) - 3*(-0.00021667822379937900 - x(1)))) - 2)*x(2)*(0.00004503498440459510 - ((-0.00021667822379937900 - x(1))/x(2) ))))*((-0.00000020584663788071 - 3*(0.00004503498440459510 - ((-0.00021667822379937900 - x(1))/x(2) ))/x(2) )/(-2*(((-0.00000020584663788071*x(2)^2 - 0.00004503498440459510 *x(2))/(2*(-0.00000020584663788071)*x(2)^2 - 7*0.00004503498440459510 *x(2) - 3*(-0.00021667822379937900 - x(1)))) - 2)*x(2)*(0.00004503498440459510 - ((-0.00021667822379937900 - x(1))/x(2) )))) + 0.00000000039625474282 ];

답변 (1개)

Andrew Newell
Andrew Newell 2011년 3월 18일
It is not asking you to change the method. It is telling you that it can't converge on the answer. The reason is your unrealistically tight tolerances for the answer. If you use TolFun = 1e-8 and TolX=1e-6, the optimizer works fine. If you really need your answer to such a high accuracy, you could try the Symbolic Toolbox.

카테고리

Help CenterFile Exchange에서 MATLAB에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by