Info

Cette question est clôturée. Rouvrir pour modifier ou répondre.

Using ' fsolve ' for solution of Non-linear equations

3 vues (au cours des 30 derniers jours)
Dr. Sandeep Soni
Dr. Sandeep Soni le 19 Mar 2014
Clôturé : MATLAB Answer Bot le 20 Août 2021
Hello Dear, I have a new problem concerning the use of fsolve, it seems that it's not working for my function, I double checked my code but I can't really find my mistake. I am asking for help to find out what's wrong with my script.
**Here below is my code * *
function r = testMOA(r0)
[r,fval] = fsolve(@myfunMOA,r0)
end
function F = myfunMOA(r)
x = r(1);
y = r(2);
F = [(((1+2.*x.^2)./(1-x.^2))+(4.*(1-2.*y.^2).*sqrt(1-x.^2).*(2+x.^2))./((1-x.^2).*(1-y.^2).^0.5.*(2+y.^2)));...
(((4.*(y.*(2+x.^2).*(1-x.^2).*sqrt(pi.^2.*(1-y.^2)+4.*y.^2)))./(x.*(2+y.^2).*(1-y.^2).*sqrt(pi.^2.*(1- x.^2)+4.*x.^2))-1))];
end
I am using the following in the MATLAB command window for getting the ROOTS of non-linear equations:
>> r0 = [0.1 0.1];
r = testMOA(r0)
Maximum number of function evaluations reached:
increase options.MaxFunEvals.
r =
1.0e-005 *
0.9044 0.2261
fval =
5.0000
0.0000
I am not understanding the meaning of this message,due to this i am not getting the correct roots of above equations.
Kindly help me.
Thanks, Sandeep Soni, E-mail - sandytit2004@gmail.com
  1 commentaire
Star Strider
Star Strider le 19 Mar 2014
See the documentation on optimoptions.

Réponses (0)

Cette question est clôturée.

Community Treasure Hunt

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

Start Hunting!

Translated by