正在加载图片...
BO=XV(MIBO QT=S(MI)S(MI) SE=DSORT(QE/(N-M-D)) R=DSQRT(1.DO-QE/QT) FORMAT(/4X.'Roots of mormal equation''A(i.m+1).i=1.m'& 33 01oG24 RETURN END SUBROUTINE GS(A.N.M,EPS) (7分) EPS.A 0I=K IF(P.GE.ABS(A(LK))NGOTO 10 ABS(A(LK)) 10 CONTINUE O SOLUTION DO 20J=K.M A A(K.J)=TMP A(IJ)=A(IJA(I.K)*A(K.J) I=060k2N D060J+1,N 60 END 4.运行结果。(20分) Normal equation A(m,m+1)m=3 (5分) 1,000 .7608 8457E-01 -5228 1.000 .7747 Roots of mormal equationA(i,m+1),i=1,m -4482 .4943 .6921 INPUT DATA:Xnl.Xn2.....Xnm.Yn(m=1.3.n=1,6) XI X2 X3Y=n XI X2 X3 DIFF7 B0=XV(M1)-B0 QT=S(M1)*S(M1) QE=QT-U SE=DSQRT(QE/(N-M-1)) R=DSQRT(1.D0-QE/QT) F=(N-M-1)*U/QE/M 22 FORMAT(/4X,'Roots of mormal equation','A(i,m+1),i=1,m' & /1x,60(1H-)) 33 FORMAT(1X,10G12.4) RETURN END SUBROUTINE GS(A,N,M,EPS) (7 分) DOUBLE PRECISION EPS,A DIMENSION A(10,11) DO 50 K=1,N P=0.0 DO 10 I=K,N IF(P.GE.ABS(A(I,K)))GOTO 10 P=ABS(A(I,K)) L=I 10 CONTINUE IF(P.LT.EPS)STOP'NO SOLUTION' IF(L.EQ.K)GOTO 30 DO 20 J=K,M TMP=A(L,J) A(L,J)=A(K,J) A(K,J)=TMP 20 CONTINUE 30 P=1.0/A(K,K) DO 40 J=K+1,M A(K,J)=A(K,J)*P DO 40 I=K+1,N A(I,J)=A(I,J)-A(I,K)*A(K,J) 40 CONTINUE 50 CONTINUE DO 60 K=2,N I=M-K DO 60 J=I+1,N A(I,M)=A(I,M)-A(I,J)*A(J,M) 60 CONTINUE RETURN END 4.运行结果。(20 分) Normal equation A(m,m+1) m= 3 (5 分) ------------------------------------------------------------ 1.000 .2623 -.7608 -.8451 .2623 1.000 -.5228 .1497E-01 -.7608 -.5228 1.000 .7747 Roots of mormal equationA(i,m+1),i=1,m ------------------------------------------------------------ -.4482 .4943 .6921 INPUT DATA:Xn1, Xn2,.... Xnm,Yn(m=1, 3,n=1, 6) X1 X2 X3 Y=η ------------------------------------------------------------------ X1 X2 X3 Y Ycalc DIFF
<<向上翻页向下翻页>>
©2008-现在 cucdc.com 高等教育资讯网 版权所有