250 PNEW=PNEW+((Y(I)-F3(X(I),A,B,PHI))**2) 

 C 



C TEST FOR CONVERGENT SOLUTION(PNEW < POLD) 

 C IF NOT, BISECT CORRECTIONS AND RECOMPUTE 

 C 



IF(PNEW.LT.POLD) GO TO 300 



AC0RR=.5*AC0RR 



BC0RR=.5*BC0RR 



PC0RR=.5*PC0RR 



NBIS=NBIS+1 



IF(NBIS.GT.IO) 60 TO 300 



GO TO 230 

 C 



C TEST FOR MINIMUM CHANGE OF A AND B 

 C 



300 IF(ABS(A-AO).GT.AMIN) GO TO 500 



IF(ABS(B-BO).GT.BMIN) GO TO 500 



IF(ABS(PHI-PHIO),GT.PHIMIN) 60 TO 500 



60 TO 900 

 C 



C CORRECTION TERM NOT FINE EN0U6H, START NEW ITERATION 

 C 



500 ITERAT=ITERAT+1 



AO=A 



BO=B 



POLD=PNEW 



IF(ILIST.EQ.1)WRITE(6,520)ITERAT,NBIS,A0,B0,PHI0,P0LD 

 520 FORMATC ' ,I6,10X,I4,6X,4(4X,F10.4)y 



NBIS=0 



60 TO 150 

 900 ITERAT=ITERAT+1 



IF(ILIST.EQ.1)WRITE(6,920)ITERAT,NBIS,A0,B0,PHI0,P0LD 

 920 FORMATC ' ,I6,10X,I4,6X,4(4X,F10.4)) 

 C RECONVERT RADIANS TO DE6REES 



DO 930 1=1, N 

 930 X(I)=X(I)*57. 2957795 



PHI=PHI*57. 2957795 



PRINT *,A,B,PHI 



RETURN 



END 

 C 

 C 



C FUNCTIONS TO CALCULATE POWER LAW FUNCTION AND PARTIAL 

 C DERIVATIVES WITH RESPECT TO A AND B 

 C 



FUNCTION F1(X3,A3,B3) 

 C CALCULATE PARTIAL OF FUNCTION WITH RESPECT TO A 



Fl=l. 



A3=A3 



X3=X3 



B3=B3 



RETURN 



183 



