用数值积分!
程序如下:
function jifen
re = 2.8e-15;
Rsun = 6.96e8; % 太阳半径
f=32e9; % 信号工作频率
c = 3e8;
lamba = c/f;
lo=2e7; % 外尺度大小
p = 11/3;
AU=1.496e11;
Lse=AU;
Lsp=1.5*AU;
v = 300e3;
omega = 2.7e-6;
i=0;
for m = 3:2:30
i = i+1;
Rhelio=m*Rsun;
temp1=4*pi^3*re^2*lamba^2*lo^(3-p)*pi^((p-1)/2)*gamma((p-1)/2);
temp2=sin(pi*p/4)*gamma(1/2)*gamma(p/2)*gamma((p-3)/2);
L=Lse*cos(asin(Rhelio/Lse))+Lsp*cos(asin(Rhelio/Lsp));
c=[Lse,Rhelio,lamba,v,Rsun,p,omega,L];
temp3=rombg(c,L,1e-6);
chi2(i)=temp1/temp2*temp3;
end
chi2
function y=f(z,c)
Lse=c(1);
Rhelio=c(2);
lamba=c(3);
v=c(4);
Rsun=c(5);
p=c(6);
omega=c(7);
L=c(8);
R=sqrt((z-Lse*cos(asin(Rhelio/Lse))).^2+Rhelio^2);
Rf=sqrt(lamba.*z.*(L-z)/L);
Ar=160./((R/Rsun).^1.5)+1;
theta=atan(-v./(omega.*R));
y=R.^(-4).*Ar.*Rf.^(p-2)./(1+(Ar.^2-1).*(sin(theta)).^2).^(0.5);
function temp3=rombg(c,L,er)
h=L;
T(1,1)=h*(f(0,c)+f(L,c))/2;
i=2;h=h/2;
T(i,1)=T(1,1)/2+h*f(L/2,c);
T(i,2)=(4*T(2,1)-T(1,1))/3;
while abs(T(i,i)-T(i-1,i-1))>er
i=i+1;h=h/2;
T(i,1)=T(i-1,1)/2+h*sum(f(h:2*h:L,c));
for k=2:1:i
T(i,k)=(4^(k-1)*T(i,k-1)-T(i-1,k-1))/(4^(k-1)-1);
end
end
temp3=T(i,i);
运行结果:
>> chi2 =
1.0e-058 *
Columns 1 through 7
0.1517 0.1500 0.1474 0.1441 0.1401 0.1355 0.1304
Columns 8 through 14
0.1249 0.1192 0.1132 0.1072 0.1011 0.0951 0.0892
>>,