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