      SUBROUTINE OUT(MM, M, N, A, CLAB, RLAB, TITLE, OUNIT)
C
C<><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><>
C
C   PURPOSE
C   -------
C
C      PRINTS A DATA MATRIX WITH THE APPROPRIATE LABELS FOR THE CASES
C      AND VARIABLES WHICH IS OUTPUT FROM MANY OF THE SUBROUTINES FROM
C      THE CLUSTER SUBLIBRARY
C
C   DESCRIPTION
C   -----------
C
C   1.  THE NAME OF THE ARRAY IS PRINTED OUT FOLLOWED BY THE MATRIX OF
C       DATA VALUES WITH APPROPRIATE ROW AND COLUMN LABELS ON FORTRAN
C       UNIT OUNIT.
C
C   INPUT PARAMETERS
C   ----------------
C
C   MM    INTEGER SCALAR (UNCHANGED ON OUTPUT).
C         THE FIRST DIMENSION OF THE MATRIX A.  MUST BE AT LEAST M.
C
C   M     INTEGER SCALAR (UNCHANGED ON OUTPUT).
C         THE NUMBER OF CASES.
C
C   N     INTEGER SCALAR (UNCHANGED ON OUTPUT).
C         THE NUMBER OF VARIABLES.
C
C   A     REAL MATRIX WHOSE FIRST DIMENSION MUST BE MM AND SECOND
C            DIMENSION MUST BE AT LEAST N  (UNCHANGED ON OUTPUT).
C         THE MATRIX OF DATA VALUES.
C
C         A(I,J) IS THE VALUE FOR THE J-TH VARIABLE FOR THE I-TH CASE.
C
C   CLAB  VECTOR OF 4-CHARACTER VARIABLES DIMENSIONED AT LEAST N.
C            (UNCHANGED ON OUTPUT).
C         THE LABELS OF THE VARIABLES.
C
C   RLAB  VECTOR OF 4-CHARACTER VARIABLES DIMENSIONED AT LEAST M.
C            (UNCHANGED ON OUTPUT).
C         THE LABELS OF THE CASES.
C
C   TITLE 10-CHARACTER VARIABLE (UNCHANGED ON OUTPUT).
C         TITLE OF THE DATA SET.
C
C   OUNIT INTEGER SCALAR (UNCHANGED ON OUTPUT).
C         UNIT NUMBER FOR OUTPUT.
C
C   REFERENCE
C   ---------
C
C     HARTIGAN, J. A. (1975).  CLUSTERING ALGORITHMS, JOHN WILEY &
C        SONS, INC., NEW YORK.  PAGES 40-41.
C
C<><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><>
C
      DIMENSION A(MM,*)
      INTEGER OUNIT
      CHARACTER*4 CLAB(*), RLAB(*)
      CHARACTER*10 TITLE
C
      IF (OUNIT .LE. 0) RETURN
      WRITE(OUNIT,1) TITLE
      WRITE(OUNIT,2)(CLAB(I),I=1,N)
      DO 10 I=1,M
   10    WRITE(OUNIT,3) RLAB(I), (A(I,J),J=1,N)
    1 FORMAT(' ARRAY ', A10, /)
    2 FORMAT(7X, 11(4X, A4, 3X))
    3 FORMAT(1X, A4, 11(F10.4,1X))
      RETURN
      END
