EVCCH
Computes all of the eigenvalues and eigenvectors of a complex upper Hessenberg matrix.
Required Arguments
A — Complex upper Hessenberg matrix of order N. (Input)
EVAL — Complex vector of length N containing the eigenvalues of A in decreasing order of magnitude. (Output)
EVEC — Complex matrix of order N. (Output)
The J-th eigenvector, corresponding to EVAL(J), is stored in the J-th column. Each vector is normalized to have Euclidean length equal to the value one.
Optional Arguments
N — Order of the matrix A. (Input)
Default: N = SIZE (A,2).
LDA — Leading dimension of A exactly as specified in the dimension statement in the calling program. (Input)
Default: LDA = SIZE (A,1).
LDEVEC — Leading dimension of EVEC exactly as specified in the dimension statement in the calling program. (Input)
Default: LDEVEC = SIZE (EVEC,1).
FORTRAN 90 Interface
Generic: CALL EVCCH (A, EVAL, EVEC [,])
Specific: The specific interface names are S_EVCCH and D_EVCCH.
FORTRAN 77 Interface
Single: CALL EVCCH (N, A, LDA, EVAL, EVEC, LDEVEC)
Double: The double precision name is DEVCCH.
Description
Routine EVCCH computes the eigenvalues and eigenvectors of a complex upper Hessenberg matrix using the QR algorithm. This routine is based on the EISPACK routine COMQR2; see Smith et al. (1976).
Comments
1. Workspace may be explicitly provided, if desired, by use of E4CCH/DE4CCH. The reference is:
CALL E4CCH (N, A, LDA, EVAL, EVEC, LDEVEC, ACOPY, CWORK, RWK, IWK)
The additional arguments are as follows:
ACOPY — Complex N by N work array. A and ACOPY may be the same, in which case A is destroyed.
CWORK — Complex work array of length 2N.
RWK — Real work array of length N.
IWK — Integer work array of length N.
2 Informational error
Type
Code
Description
4
1
The iteration for the eigenvalues failed to converge.
3. The results of EVCCH can be checked using EPICG. This requires that the matrix A explicitly contains the zeros in A(I, J) for (I – 1) > J which are assumed by EVCCH.
Example
In this example, a DATA statement is used to set the matrix A. The program computes the eigenvalues and eigenvectors of this matrix. The performance index is also computed and printed. This serves as a check on the computations; for more details, see IMSL routine EPICG. The zeros in the lower part of the matrix are not referenced by EVCCH, but they are required by EPICG.
 
USE EVCCH_INT
USE EPICG_INT
USE UMACH_INT
USE WRCRN_INT
 
IMPLICIT NONE
! Declare variables
INTEGER LDA, LDEVEC, N
PARAMETER (N=4, LDA=N, LDEVEC=N)
!
INTEGER NOUT
REAL PI
COMPLEX A(LDA,N), EVAL(N), EVEC(LDEVEC,N)
! Set values of A
!
! A = (5+9i 5+5i -6-6i -7-7i)
! (3+3i 6+10i -5-5i -6-6i)
! ( 0 3+3i -1+3i -5-5i)
! ( 0 0 -3-3i 4i)
!
DATA A/(5.0,9.0), (3.0,3.0), (0.0,0.0), (0.0,0.0), (5.0,5.0), &
(6.0,10.0), (3.0,3.0), (0.0,0.0), (-6.0,-6.0), (-5.0,-5.0), &
(-1.0,3.0), (-3.0,-3.0), (-7.0,-7.0), (-6.0,-6.0), &
(-5.0,-5.0), (0.0,4.0)/
!
! Find eigenvalues and vectors of A
CALL EVCCH (A, EVAL, EVEC)
! Compute performance index
PI = EPICG(N,A,EVAL,EVEC)
! Print results
CALL UMACH (2, NOUT)
CALL WRCRN ('EVAL', EVAL, 1, N, 1)
CALL WRCRN ('EVEC', EVEC)
WRITE (NOUT,'(/,A,F6.3)') ' Performance index = ', PI
END
Output
EVAL
1 2 3 4
( 8.22, 12.22) ( 3.40, 7.40) ( 1.60, 5.60) ( -3.22, 0.78)
EVEC
1 2 3 4
1 ( 0.7167, 0.0000) (-0.0704, 0.0000) (-0.3678, 0.0000) ( 0.5429, 0.0000)
2 ( 0.6402,-0.0000) (-0.0046,-0.0000) ( 0.6767, 0.0000) ( 0.4298,-0.0000)
3 ( 0.2598, 0.0000) ( 0.7477, 0.0000) (-0.3005, 0.0000) ( 0.5277,-0.0000)
4 (-0.0948,-0.0000) (-0.6603,-0.0000) ( 0.5625, 0.0000) ( 0.4920,-0.0000)
 
Performance index = 0.020
Published date: 03/19/2020
Last modified date: 03/19/2020