C.hr DGMSUB
C@
C....*...1.........2.........3.........4.........5.........6.........7.*
C     DGMSUB  10/16/71
C
C     PURPOSE
C     SUBTRACT TWO MATRICES: R = A - B
C
C     USAGE
C     CALL DGMSUB(A,B,R,N,M)
C
C     ARGUMENTS
C     A - INPUT N BY M MATRIX STORED COLUMNWISE (STORAGE MODE 0)
C         REAL*8
C     B - INPUT N BY M MATRIX STORED COLUMNWISE (STORAGE MODE 0)
C         REAL*8
C     R - OUTPUT N BY M MATRIX STORED COLUMNWISE (STORAGE MODE 0)
C         REAL*8
C     N - NUMBER OF ROWS IN A, B, AND R
C         INTEGER*4
C     M - NUMBER OF COLUMNS IN A, B, AND R
C         INTEGER*4
C
      SUBROUTINE DGMSUB(A,B,R,M,N)
      implicit real*8 (a-h,o-z)
      save
      REAL*8 A(N*M),B(N*M),R(N*M)
      NM=N*M
      DO 10 I=1,NM
10    R(I)=A(I)-B(I)
      RETURN
      END
