hide long namesshow long names
hide short namesshow short names
Integer type:  int32  int64  nag_int  show int32  show int32  show int64  show int64  show nag_int  show nag_int

PDF version (NAG web site, 64-bit version, 64-bit version)
Chapter Contents
Chapter Introduction
NAG Toolbox

NAG Toolbox: nag_lapack_dgeesx (f08pb)

Purpose

nag_lapack_dgeesx (f08pb) computes the eigenvalues, the real Schur form TT, and, optionally, the matrix of Schur vectors ZZ for an nn by nn real nonsymmetric matrix AA.

Syntax

[a, sdim, wr, wi, vs, rconde, rcondv, info] = f08pb(jobvs, sort, select, sense, a, 'n', n)
[a, sdim, wr, wi, vs, rconde, rcondv, info] = nag_lapack_dgeesx(jobvs, sort, select, sense, a, 'n', n)

Description

The real Schur factorization of AA is given by
A = Z T ZT ,
A = Z T ZT ,
where ZZ, the matrix of Schur vectors, is orthogonal and TT is the real Schur form. A matrix is in real Schur form if it is upper quasi-triangular with 11 by 11 and 22 by 22 blocks. 22 by 22 blocks will be standardized in the form
[ a b c a ]
[ a b c a ]
where bc < 0bc<0. The eigenvalues of such a block are a ± sqrt(bc)a±bc.
Optionally, nag_lapack_dgeesx (f08pb) also orders the eigenvalues on the diagonal of the real Schur form so that selected eigenvalues are at the top left; computes a reciprocal condition number for the average of the selected eigenvalues (rconde); and computes a reciprocal condition number for the right invariant subspace corresponding to the selected eigenvalues (rcondv). The leading columns of ZZ form an orthonormal basis for this invariant subspace.
For further explanation of the reciprocal condition numbers rconde and rcondv, see Section 4.8 of Anderson et al. (1999) (where these quantities are called ss and sepsep respectively).

References

Anderson E, Bai Z, Bischof C, Blackford S, Demmel J, Dongarra J J, Du Croz J J, Greenbaum A, Hammarling S, McKenney A and Sorensen D (1999) LAPACK Users' Guide (3rd Edition) SIAM, Philadelphia http://www.netlib.org/lapack/lug
Golub G H and Van Loan C F (1996) Matrix Computations (3rd Edition) Johns Hopkins University Press, Baltimore

Parameters

Compulsory Input Parameters

1:     jobvs – string (length ≥ 1)
If jobvs = 'N'jobvs='N', Schur vectors are not computed.
If jobvs = 'V'jobvs='V', Schur vectors are computed.
Constraint: jobvs = 'N'jobvs='N' or 'V''V'.
2:     sort – string (length ≥ 1)
Specifies whether or not to order the eigenvalues on the diagonal of the Schur form.
sort = 'N'sort='N'
Eigenvalues are not ordered.
sort = 'S'sort='S'
Eigenvalues are ordered (see select).
Constraint: sort = 'N'sort='N' or 'S''S'.
3:     select – function handle or string containing name of m-file
If sort = 'S'sort='S', select is used to select eigenvalues to sort to the top left of the Schur form.
If sort = 'N'sort='N', select is not referenced and nag_lapack_dgeesx (f08pb) may be called with the string 'f08paz'.
An eigenvalue wr(j) + sqrt(1) × wi(j)wrj+-1×wij is selected if select(wr(j),wi(j))select(wrj,wij) is true. If either one of a complex conjugate pair of eigenvalues is selected, then both are. Note that a selected complex eigenvalue may no longer satisfy select(wr(j),wi(j)) = trueselect(wrj,wij)=true after ordering, since ordering may change the value of complex eigenvalues (especially if the eigenvalue is ill-conditioned); in this case info is set to n + 2n+2 (see info below).
[result] = select(wr, wi)

Input Parameters

1:     wr – double scalar
2:     wi – double scalar
The real and imaginary parts of the eigenvalue.

Output Parameters

1:     result – logical scalar
The result of the function.
4:     sense – string (length ≥ 1)
Determines which reciprocal condition numbers are computed.
sense = 'N'sense='N'
None are computed.
sense = 'E'sense='E'
Computed for average of selected eigenvalues only.
sense = 'V'sense='V'
Computed for selected right invariant subspace only.
sense = 'B'sense='B'
Computed for both.
If sense = 'E'sense='E', 'V''V' or 'B''B', sort = 'S'sort='S'.
Constraint: sense = 'N'sense='N', 'E''E', 'V''V' or 'B''B'.
5:     a(lda, : :) – double array
The first dimension of the array a must be at least max (1,n)max(1,n)
The second dimension of the array must be at least max (1,n)max(1,n)
The nn by nn matrix AA.

Optional Input Parameters

1:     n – int64int32nag_int scalar
Default: The first dimension of the array a and the second dimension of the array a. (An error is raised if these dimensions are not equal.)
nn, the order of the matrix AA.
Constraint: n0n0.

Input Parameters Omitted from the MATLAB Interface

lda ldvs work lwork iwork liwork bwork

Output Parameters

1:     a(lda, : :) – double array
The first dimension of the array a will be max (1,n)max(1,n)
The second dimension of the array will be max (1,n)max(1,n)
ldamax (1,n)ldamax(1,n).
a stores its real Schur form TT.
2:     sdim – int64int32nag_int scalar
If sort = 'N'sort='N', sdim = 0sdim=0.
If sort = 'S'sort='S', sdim = sdim= number of eigenvalues (after sorting) for which select is true. (Complex conjugate pairs for which select is true for either eigenvalue count as 22.)
3:     wr( : :) – double array
Note: the dimension of the array wr must be at least max (1,n)max(1,n).
See the description of wi.
4:     wi( : :) – double array
Note: the dimension of the array wi must be at least max (1,n)max(1,n).
wr and wi contain the real and imaginary parts, respectively, of the computed eigenvalues in the same order that they appear on the diagonal of the output Schur form TT. Complex conjugate pairs of eigenvalues will appear consecutively with the eigenvalue having the positive imaginary part first.
5:     vs(ldvs, : :) – double array
The first dimension, ldvs, of the array vs will be
  • if jobvs = 'V'jobvs='V', ldvs max (1,n) ldvs max(1,n) ;
  • otherwise ldvs1ldvs1.
The second dimension of the array will be max (1,n)max(1,n) if jobvs = 'V'jobvs='V', and at least 11 otherwise
If jobvs = 'V'jobvs='V', vs contains the orthogonal matrix ZZ of Schur vectors.
If jobvs = 'N'jobvs='N', vs is not referenced.
6:     rconde – double scalar
If sense = 'E'sense='E' or 'B''B', contains the reciprocal condition number for the average of the selected eigenvalues.
If sense = 'N'sense='N' or 'V''V', rconde is not referenced.
7:     rcondv – double scalar
If sense = 'V'sense='V' or 'B''B', rcondv contains the reciprocal condition number for the selected right invariant subspace.
If sense = 'N'sense='N' or 'E''E', rcondv is not referenced.
8:     info – int64int32nag_int scalar
info = 0info=0 unless the function detects an error (see Section [Error Indicators and Warnings]).

Error Indicators and Warnings

Cases prefixed with W are classified as warnings and do not generate an error of type NAG:error_n. See nag_issue_warnings.

  info = iinfo=-i
If info = iinfo=-i, parameter ii had an illegal value on entry. The parameters are numbered as follows:
1: jobvs, 2: sort, 3: select, 4: sense, 5: n, 6: a, 7: lda, 8: sdim, 9: wr, 10: wi, 11: vs, 12: ldvs, 13: rconde, 14: rcondv, 15: work, 16: lwork, 17: iwork, 18: liwork, 19: bwork, 20: info.
It is possible that info refers to a parameter that is omitted from the MATLAB interface. This usually indicates that an error in one of the other input parameters has caused an incorrect value to be inferred.
  INFO = 1tonINFO=1ton
If info = iinfo=i and inin, the QRQR algorithm failed to compute all the eigenvalues.
W INFO = N + 1INFO=N+1
The eigenvalues could not be reordered because some eigenvalues were too close to separate (the problem is very ill-conditioned).
W INFO = N + 2INFO=N+2
After reordering, roundoff changed values of some complex eigenvalues so that leading eigenvalues in the Schur form no longer satisfy select = trueselect=true. This could also be caused by underflow due to scaling.

Accuracy

The computed Schur factorization satisfies
A + E = ZTZT ,
A+E = ZTZT ,
where
E2 = O(ε) A2 ,
E2 = O(ε) A2 ,
and εε is the machine precision. See Section 4.8 of Anderson et al. (1999) for further details.

Further Comments

The total number of floating point operations is proportional to n3n3.
The complex analogue of this function is nag_lapack_zgeesx (f08pp).

Example

function nag_lapack_dgeesx_example
jobvs = 'Vectors (Schur)';
sortp = 'Sort';
select = @(wr, wi) (wi == 0);
sense = 'Both reciprocal condition numbers';
a = [0.35, 0.45, -0.14, -0.17;
     0.09, 0.07, -0.54, 0.35;
     -0.44, -0.33, -0.03, 0.17;
     0.25, -0.32, -0.13, 0.11];
[aOut, sdim, wr, wi, vs, rconde, rcondv, info] = ...
    nag_lapack_dgeesx(jobvs, sortp, select, sense, a)
 

aOut =

    0.7995   -0.0059   -0.0751   -0.0927
         0   -0.1007    0.3937    0.3569
         0         0   -0.0994   -0.5128
         0         0    0.3132   -0.0994


sdim =

                    2


wr =

    0.7995
   -0.1007
   -0.0994
   -0.0994


wi =

         0
         0
    0.4008
   -0.4008


vs =

   -0.6551   -0.1210   -0.5032    0.5504
   -0.5236   -0.3286    0.7857    0.0229
    0.5362   -0.5974    0.0904    0.5894
   -0.0956   -0.7215   -0.3482   -0.5908


rconde =

    0.5699


rcondv =

    0.3102


info =

                    0


function f08pb_example
jobvs = 'Vectors (Schur)';
sortp = 'Sort';
select = @(wr, wi) (wi == 0);
sense = 'Both reciprocal condition numbers';
a = [0.35, 0.45, -0.14, -0.17;
     0.09, 0.07, -0.54, 0.35;
     -0.44, -0.33, -0.03, 0.17;
     0.25, -0.32, -0.13, 0.11];
[aOut, sdim, wr, wi, vs, rconde, rcondv, info] = ...
    f08pb(jobvs, sortp, select, sense, a)
 

aOut =

    0.7995   -0.0059   -0.0751   -0.0927
         0   -0.1007    0.3937    0.3569
         0         0   -0.0994   -0.5128
         0         0    0.3132   -0.0994


sdim =

                    2


wr =

    0.7995
   -0.1007
   -0.0994
   -0.0994


wi =

         0
         0
    0.4008
   -0.4008


vs =

   -0.6551   -0.1210   -0.5032    0.5504
   -0.5236   -0.3286    0.7857    0.0229
    0.5362   -0.5974    0.0904    0.5894
   -0.0956   -0.7215   -0.3482   -0.5908


rconde =

    0.5699


rcondv =

    0.3102


info =

                    0



PDF version (NAG web site, 64-bit version, 64-bit version)
Chapter Contents
Chapter Introduction
NAG Toolbox

© The Numerical Algorithms Group Ltd, Oxford, UK. 2009–2013