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

9 views (last 30 days)
BALPARTAP SINGH on 4 Dec 2020
Answered: Anmol Dhiman on 7 Dec 2020
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

Anmol Dhiman on 7 Dec 2020
Hi BalPartap,
Regards,
Anmol Dhiman