Info

This question is closed. Reopen it to edit or answer.

Using ' fsolve ' for solution of Non-linear equations

1 view (last 30 days)
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

Answers (0)

Community Treasure Hunt

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

Start Hunting!