1、!程序中数组的各元素依次为分潮 MSf,Q1,O1,K1,P1,K2,N2,M2,S2,MK3,M4,MS6,M6program tiaohechangshuimplicit noneinteger,dimension(78):n=(/0,2,-2,0,0,0,1,-2,0,1,0,0,1,-1,0,0,0,0,AA(0,0)=743;ot=1;N2=743;F1=0;F2=0do i=-371,371F1(0,1)=F1(0,1)+hr(i)end dodo i=1,13do j=-371,371F1(i,1)=F1(i,1)+hr(j)*cosd(j*OO(i)*ot)F2(i,1)=F2
2、(i,1)+hr(j)*sind(j*OO(i)*ot)end doend dodo j=1,13AA(j,0)=sind(N2*OO(j)*ot/2.0)/sind(OO(j)*ot/2.0)AA(0,j)=sind(N2*OO(j)*ot/2.0)/sind(OO(j)*ot/2.0)AA(j,j)=(N2+sind(N2*OO(j)*ot)/sind(OO(j)*ot)/2.0BB(j,j)=(N2-sind(N2*OO(j)*ot)/sind(OO(j)*ot)/2.0do i=1,13if (i/=j) thenAA(i,j)=(sind(N2*(OO(i)-OO(j)*ot/2.0
3、)/sind(OO(i)-OO(j)*ot/2.0)+sind(N2*(OO(i)+OO(j)*ot/2.0)/sind(OO(i)+OO(j)*ot/2.0)/2.0BB(i,j)=(sind(N2*(OO(i)-OO(j)*ot/2.0)/sind(OO(i)-OO(j)*ot/2.0)-sind(N2*(OO(i)+OO(j)*ot/2.0)/sind(OO(i)+OO(j)*ot/2.0)/2.0end ifend doend doAAA(:,0:13)=AA(:,0:13)AAA(:,14)=F1(:,1)BBB(:,1:13)=BB(:,:)BBB(:,14)=F2(:,1)!用高
4、斯消元法求解g=size(AAA,dim=1)-1;g1=size(BBB,dim=1)!求解各分潮 a 的值do j=0,g-1do i=j+1,gAAA(i,:)=AAA(i,:)-AAA(j,:)*(AAA(i,j)/AAA(j,j)end doend doAA1(:,:)=AAA(:,0:g)F11(:,1)=AAA(:,g+1)a(g)=F11(g,1)/AA1(g,g)do i=g-1,0,-1a(i)=(F11(i,1)-sum(AA1(i,(i+1):g)*a(i+1):g)/AA1(i,i)end do!求解各分潮 b 的值do j=1,g1-1do i=j+1,g1BBB(
5、i,:)=BBB(i,:)-BBB(j,:)*(BBB(i,j)/BBB(j,j)end doend doBB1(:,:)=BBB(:,1:g1)F22(:,1)=BBB(:,g1+1)b(g1)=F22(g1,1)/BB1(g1,g1)do i=g1-1,1,-1b(i)=(F22(i,1)-sum(BB1(i,(i+1):g1)*b(i+1):g1)/BB1(i,i)end do!求解调和常数do j=1,13R(j)=(a(j)*2+b(j)*2)*0.5C(j)=atand(b(j)/a(j)H1(j)=R(j)/f(j)gg(j)=(C(j)+V0(j)+u(j)/360end doprint*,H1print*,ggend program tiaohechangshu