The LA_EIGENVEC function uses the QR algorithm to compute all or some of the eigenvectors v ¹ 0 of an n-by-n real nonsymmetric or complex non-Hermitian array A, for the eigenproblem Av = lv. The routine can also compute the left eigenvectors u ¹ 0, which satisfy uHA = luH.
LA_EIGENVEC is based on the following LAPACK routines:
For details see Anderson et al., LAPACK Users' Guide, 3rd ed., SIAM, 1999.
Result = LA_EIGENVEC( T, QZ [, BALANCE=value] [, /DOUBLE] [, EIGENINDEX=variable] [, LEFT_EIGENVECTORS=variable] [, PERMUTE_RESULT=[ilo, ihi]] [, SCALE_RESULT=vector] [, RCOND_VALUE=variable] [, RCOND_VECTOR=variable] [, SELECT=vector])
The result is a complex array containing the eigenvectors as a set of row vectors.
The upper quasi-triangular array containing the Schur form, created by LA_HQR.
The array of Schur vectors, created by LA_HQR.
If balancing was applied in the call to LA_ELMHES, then set this keyword to the same value that was used, in order to apply the backward balancing transform to the eigenvectors. If BALANCE is not specified, then the default is BALANCE = 1.
Set this keyword to use double-precision for computations and to return a double-precision (real or complex) result. Set DOUBLE = 0 to use single-precision for computations and to return a single-precision (real or complex) result. The default is /DOUBLE if T is double precision, otherwise the default is DOUBLE = 0.
If keyword SELECT is used, then set this keyword to a named variable in which the indices of the eigenvalues that correspond to the selected eigenvectors will be returned. If the SELECT keyword is not used then EIGENINDEX will be set to LINDGEN(n).
Set this keyword to a named variable in which the left eigenvectors will be returned as a set of row vectors. If this variable is omitted then left eigenvectors will not be computed unless the RCOND_VALUE keyword is present.
Set this keyword to a two-element vector containing the [ilo, ihi] permutation results from the LA_ELMHES procedure. This keyword must be present if BALANCE = 1 or BALANCE = 2.
Set this keyword to a named variable in which the reciprocal condition numbers for the eigenvalues will be returned as an n-element vector. If RCOND_VALUE is present then left and right eigenvectors must be computed.
Set this keyword to a named variable in which the reciprocal condition numbers for the eigenvectors will be returned as an n-element vector.
Set this keyword to an n-element vector containing the permute and scale balancing results from the LA_ELMHES procedure. This keyword must be present if BALANCE is not zero.
Set this keyword to an n-element vector of zeroes or ones that indicates which eigenvectors to compute. There are two cases:
If SELECT is omitted then all eigenvectors are returned.
Compute the eigenvalues and selected eigenvectors of a random array using the following program:
PRO ExLA_EIGENVEC ; Create a random array: n = 10 seed = 12321 array = RANDOMN(seed, n, n) ; Reduce to upper Hessenberg and compute Q: H = LA_ELMHES(array, q, $ PERMUTE_RESULT = permute, SCALE_RESULT = scale) ; Compute eigenvalues, T, and QZ arrays: eigenvalues = LA_HQR(h, q, PERMUTE_RESULT = permute) ; Compute eigenvectors corresponding to ; the first 3 eigenvalues. select = [1, 1, 1, REPLICATE(0, n - 3)] eigenvectors = LA_EIGENVEC(H, Q, $ EIGENINDEX = eigenindex, $ PERMUTE_RESULT = permute, SCALE_RESULT = scale, $ SELECT = select) PRINT, 'LA_EIGENVEC eigenvalues:' PRINT, eigenvalues[eigenindex] END
When this program is compiled and run, IDL prints:
LA_EIGENVEC eigenvalues: (-0.278633, 2.55055) ( -0.278633, -2.55055) (2.31208, 0.000000)
EIGENVEC, LA_ELMHES, LA_HQR