Warning: Reached the maximum number of function evaluations (10000). The result passes the global error test.
4 次查看(过去 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
0 个评论
回答(1 个)
Anmol Dhiman
2020-12-7
1 个评论
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.
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 ANOVA 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!