Warning: Reached the maximum number of function evaluations (10000). The result passes the global error test.

조회 수: 14 (최근 30일)
theta= xlsread('KomoriPro1.xlsx',1,'A:A');
phi= xlsread('KomoriPro1.xlsx',1,'D:D');
theta_= xlsread('KomoriPro1.xlsx',1,'G:G');
phi_= xlsread('KomoriPro1.xlsx',1,'K:K');
theta= theta*pi/180;
theta_= theta_*pi/180;
phi=phi*pi/180;
phi_=phi_*pi/180;
a = zeros(19^4,1);% matrix for chi (130321x1)
J = zeros(19^4,1);
I = zeros(19^4,1);
count = 1;
for i= 1:length(theta)
for j= 1: length(phi)
for k= 1: length(theta_)
for m=1:length(phi_)
chi= acos(sin(theta(i))*sin(theta_(k))*cos(phi(j))*cos(phi_(m))+sin(theta(i))*sin(theta_(k))*sin(phi(j))*sin(phi_(m))+ cos(theta(i))*cos(theta_(k)));
a(count) = chi;
if theta(i) == (1.571)
O = integral2(@(theta,phi) asin(theta)*dirac(pi/2) , 0,3.14,0,3.14);
J(count) = integral2(@(theta_,phi_) O*sin(chi)*sin(theta_),0,3.14,0,3.14);
I(count) = integral2(@(theta,phi) J(count)*O*sin(theta),0,3.14,0,3.14);
else
O = integral2(@(theta,phi) asin(theta) , 0,3.14,0,3.14);
J(count) = integral2(@(theta_,phi_) O*sin(chi)*sin(theta_),0,3.14,0,3.14);
I(count) = integral2(@(theta,phi) J(count)*O*sin(theta),0,3.14,0,3.14);
end
count = count + 1;
end
end
end
end

답변 (1개)

Anmol Dhiman
Anmol Dhiman 2020년 12월 7일
Hi BalPartap,
Regards,
Anmol Dhiman
  댓글 수: 1
Eugene Benilov
Eugene Benilov 2023년 5월 11일
Unfortunately, this isn't a "similar question". Anmol Dhiman's link deals with the case where the global error test is FAILED, whereas the actual question is about the case where the error test is PASSED.
I've got a similar situation, where the test is passed, and I'd like to know if I can trust the result of the computation.
I might add that, in my problem, the integrand involves a Heaviside step-function: a well-written function should be able to handle it... but I'm not sure whether the one I use (quad2d) does.

댓글을 달려면 로그인하십시오.

Community Treasure Hunt

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

Start Hunting!

Translated by