C=======MULTIPLICATION OF MATRICES======
      SUBROUTINE MULMA2(NC,NC1,N1,IMIN,B,B1,B2)
      INTEGER IMIN(*)
      REAL*8 B(N1,*),B1(N1,*),A,B2(*)
      DO 1 JN=1,NC
         DO 2 I=1,N1
            A=0.0D 00
            DO 3 J=1,NC1
               I1=IMIN(J)
               IF(I1.NE.0) A=A+B(I,J)*B1(I1,JN)
    3          CONTINUE
            B2(I)=A
    2    CONTINUE
C       WRITE(*,*) JN
            DO 4 I=1,N1
            B1(I,JN)=B2(I)
    4       CONTINUE
    1  CONTINUE
C       WRITE(*,*) A
      RETURN
      END
