Warning: Reached the maximum number of function evaluations (10000). The result passes the global error test.
조회 수: 2 (최근 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!