C     ***********************
C     *  SUBROUTINE MKMATF  *
C     ***********************
C
      SUBROUTINE MKMATF(SX,SZ,ND1,OM,F,NI,IND,IFLT,NCF)
C
      IMPLICIT REAL*8(A-H,M,O-Z)
      COMPLEX*16 F(ND1),M0W,H1
      DIMENSION SX(ND1),SZ(ND1),NCF(10)
      COMMON /CONS/ RT,VR,DV,FW,VS1,VS2,DN1,DN2,Q1,Q2
     *       / XZ / FX0(10),FZ0(10),DA(10),NFLT
     *       / QF / NQF / RADPATN / NRAD
C
      VS=VS2
      DN=DN2
C
      SS=OM/VS
C
      TW=FW/VR
      XW=OM*TW/2.D0
      XT=OM*RT/2.D0
      M0=DN*VS*VS*DV*FW
      M0W=M0*DSIN(XT)/XT*DSIN(XW)/XW
     *    *CDEXP(-DCMPLX(0.D0,1.D0)*(XT+XW))
C
      XF=FX0(IFLT)
      ZF=FZ0(IFLT)
      XN=+DSIN(DA(IFLT))
      ZN=-DCOS(DA(IFLT))
C
      DO 100 I=1,NI
C
        XI=(SX(I)+SX(I+1))*.5D0
        IF(IND.EQ.1) THEN
          ZI=(SZ(I)+SZ(I+1))*.5D0
        ELSE
          ZI=0.D0
        END IF
C
        RX=XF-XI
        RZ=ZF-ZI
        R =DSQRT(RX*RX+RZ*RZ)
C
        CALL BESJN1(SS*R,Y2,Y1)
        H1=DCMPLX(Y2,-Y1)
        IF(NQF.NE.0)H1=H1*DEXP(-OM*R/(2.D0*Q2*VS))
        RF=(RX*XN+RZ*ZN)/R
        IF(NRAD.NE.0)RF=-1.D0
C
        F(I)=0.25D0/(DN*VS*VS*VS)*H1*M0W*RF
C
  100 CONTINUE
C
C     *****  CHECKER'S FLAG NO.5  *****
C
      IF(NCF(5).EQ.1) THEN
      WRITE(6,*) ' *****  MATRIX F  *****'
      WRITE(6,*) (F(I),I=1,NI)
      END IF
C
      RETURN
      END
