Getting an error, fsolve stopped because it exceeded the function evaluation limit, options.MaxFunctionEvaluations = 200 (the selected value). I tried increasing the value to 400, then 2000 but still it shows this error. please help.
Info
This question is closed. Reopen it to edit or answer.
Show older comments
my code is -
function F = myfun(z)
a = 3*10^-6;
lambda = 632*10^-9;
n1 = 1.455;
n2 = 1.45;
k0 = 2*pi/lambda;
k1 = 2*pi*n1/lambda;
k2 = 2*pi*n2/lambda;
F(1) = (((1/2.*besselj(0,z(2))-besselj(2,z(2)))./(z(2)/a).*(besselj(1,z(2))))) +(((1/2.*besselk(0,z(1))-besselk(2,z(1))))./((z(1)/a).*(besselk(1,z(1))))).*(((k1^2).*(((1/2.*besselj(0,z(2))-besselj(2,z(2))))./((z(2)/a).*(besselj(1,z(2))))) + ((k2^2).*(((1/2.*besselk(0,z(1))-besselk(2,z(1))))./((z(1)/a).*(besselk(1,z(1))))))));
F(2) = (((((k0^2*n1^2-(z(2)/a)^2))*1/(a^2))).*((z(2)/a).^-2+(z(1)/a).^-2).^2);
end
Answers (0)
This question is closed.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!