      SUBROUTINE ELTRAN(NM,N,LOW,IGH,PA,KINT,PZ)
c
      INTEGER I,J,N,KL,MM,MP,NM,IGH,LOW,MP1
      REAL             PA(NM,IGH),PZ(NM,N)
      INTEGER KINT(IGH)
c
c     this subroutine is a translation of the algol procedure elmtrans,
c     num. math. 16, 181-204(1970) by peters and wilkinson.
c     handbook for auto. comp., vol.ii-linear algebra, 372-395(1971).
c
c     this subroutine accumulates the stabilized elementary
c     similarity transformations used in the reduction of a
c     real general matrix to upper hessenberg form by  elmhes.
c
c     on input
c
c        nm must be set to the row dimension of two-dimensional
c          array parameters as declared in the calling program
c          dimension statement.
c
c        n is the order of the matrix.
c
c        low and igh are integers determined by the balancing
c          subroutine  balanc.  if  balanc  has not been used,
c          set low=1, igh=n.
c
c        pa contains the multipliers which were used in the
c          reduction by  elmhes  in its lower triangle
c          below the subdiagonal.
c
c        kint contains information on the rows and columns
c          interchanged in the reduction by  elmhes.
c          only elements low through igh are used.
c
c     on output
c
c        pz contains the transformation matrix produced in the
c          reduction by  elmhes.
c
c     questions and comments should be directed to burton s. garbow,
c     mathematics and computer science div, argonne national laboratory
c
c     this version dated august 1983.
c
c     ------------------------------------------------------------------
c
c     .......... initialize pz to identity matrix ..........
      DO 80 J = 1, N
c
         DO 60 I = 1, N
   60    PZ(I,J) = 0.0E0
c
         PZ(J,J) = 1.0E0
   80 CONTINUE
c
      KL = IGH - LOW - 1
      IF (KL .LT. 1) GO TO 200
c     .......... for mp=igh-1 step -1 until low+1 do -- ..........
      DO 140 MM = 1, KL
         MP = IGH - MM
         MP1 = MP + 1
c
         DO 100 I = MP1, IGH
  100    PZ(I,MP) = PA(I,MP-1)
c
         I = KINT(MP)
         IF (I .EQ. MP) GO TO 140
c
         DO 130 J = MP, IGH
            PZ(MP,J) = PZ(I,J)
            PZ(I,J) = 0.0E0
  130    CONTINUE
c
         PZ(I,MP) = 1.0E0
  140 CONTINUE
c
  200 RETURN
      END
