      SUBROUTINE EIG1(IBAL,A,KA,N,WR,WI,IERR)
      DIMENSION A(KA,N),WR(N),WI(N)
      LOW=1
      IGH=N
      IF (IBAL.NE.0) CALL BALANC(KA,N,A,LOW,IGH,WR)
      CALL ORTHES(KA,N,LOW,IGH,A,WR)
      CALL HQR(KA,N,LOW,IGH,A,WR,WI,IERR)
      RETURN
      END
