Trust-Region Dogleg Method - what do I do?

10 visualizaciones (últimos 30 días)
john birt
john birt el 18 de Mzo. de 2011
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 ];

Respuestas (1)

Andrew Newell
Andrew Newell el 18 de Mzo. de 2011
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.

Categorías

Más información sobre Solver Outputs and Iterative Display 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!

Translated by