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.
정보
이 질문은 마감되었습니다. 편집하거나 답변을 올리려면 질문을 다시 여십시오.
이전 댓글 표시
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
답변 (0개)
이 질문은 마감되었습니다.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!