syms p q;
fun2=@(p,q)F.^2.sin(p)
Dose=int(int(fun2,p,0,2pi),q,0,pi)
%完整代码
xi=1;
yi=1;
zi=1;
x0=5;
y0=5;
z0=5;
p=cos((zi-z0)/sqrt(xi-x0)^2+(yi-y0)^2+(zi-z0)^2)^(-1)
q=sin((yi-y0)/sqrt(xi-x0)^2+(yi-y0)^2+(zi-z0)^2)^(-1)
F=exp(x0*sin(p)cos(q)+y0sin(p)sin(q)+z0cos(p)+1)
syms p q;
fun2=@(p,q)F.^2.sin(p)
Dose=int(int(fun2,p,0,2pi),q,0,pi)
G=(4.*pi.*F.^2)/Dose
R=log2(1+G)