EVLCH

Computes all of the eigenvalues 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)

Required 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).

FORTRAN 90 Interface

Generic:          CALL EVLCH (A, EVAL [,…])

Specific:          The specific interface names are S_EVLCH and D_EVLCH.

FORTRAN 77 Interface

Single:            CALL EVLCH (N, A, LDA, EVAL)

Double:          The double precision name is DEVLCH.

Description

Routine EVLCH computes the eigenvalues 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 E3LCH/DE3LCH. The reference is:

CALL E3LCH (N, A, LDA, EVAL, ACOPY, 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.

RWK — Real work array of length N.

IWK — Integer work array of length N.

2.         Informational error

Type   Code

4           1                  The iteration for the eigenvalues failed to converge.

Example

In this example, a DATA statement is used to set the matrix A. The program computes and prints the eigenvalues of this matrix.

 

      USE EVLCH_INT

      USE WRCRN_INT

 

      IMPLICIT NONE

!                                 Declare variables

      INTEGER LDA, N

      PARAMETER (N=4, LDA=N)

      COMPLEX A(LDA,N), EVAL(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 the eigenvalues of A

      CALL EVLCH (A, EVAL)

!                                 Print results

      CALL WRCRN ('EVAL', EVAL, 1, N, 1)

      END

Output

                                EVAL

               1                2                3                4

 (  8.22, 12.22)  (  3.40,  7.40)  (  1.60,  5.60)  ( -3.22,  0.78)


Visual Numerics, Inc.
Visual Numerics - Developers of IMSL and PV-WAVE
http://www.vni.com/
PHONE: 713.784.3131
FAX:713.781.9260