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_ztgevc (f08yx)

Purpose

nag_lapack_ztgevc (f08yx) computes some or all of the right and/or left generalized eigenvectors of a pair of complex upper triangular matrices (A,B)(A,B).

Syntax

[vl, vr, m, info] = f08yx(side, howmny, select, a, b, vl, vr, mm, 'n', n)
[vl, vr, m, info] = nag_lapack_ztgevc(side, howmny, select, a, b, vl, vr, mm, 'n', n)

Description

nag_lapack_ztgevc (f08yx) computes some or all of the right and/or left generalized eigenvectors of the matrix pair (A,B)(A,B) which is assumed to be in upper triangular form. If the matrix pair (A,B)(A,B) is not upper triangular then the function nag_lapack_zhgeqz (f08xs) should be called before invoking nag_lapack_ztgevc (f08yx).
The right generalized eigenvector xx and the left generalized eigenvector yy of (A,B)(A,B) corresponding to a generalized eigenvalue λλ are defined by
(AλB)x = 0
(A-λB)x=0
and
yH (AλB) = 0.
yH (A-λ B)=0.
If a generalized eigenvalue is determined as 0 / 00/0, which is due to zero diagonal elements at the same locations in both AA and BB, a unit vector is returned as the corresponding eigenvector.
Note that the generalized eigenvalues are computed using nag_lapack_zhgeqz (f08xs) but nag_lapack_ztgevc (f08yx) does not explicitly require the generalized eigenvalues to compute eigenvectors. The ordering of the eigenvectors is based on the ordering of the eigenvalues as computed by nag_lapack_ztgevc (f08yx).
If all eigenvectors are requested, the function may either return the matrices XX and/or YY of right or left eigenvectors of (A,B)(A,B), or the products ZXZX and/or QYQY, where ZZ and QQ are two matrices supplied by you. Usually, QQ and ZZ are chosen as the unitary matrices returned by nag_lapack_zhgeqz (f08xs). Equivalently, QQ and ZZ are the left and right Schur vectors of the matrix pair supplied to nag_lapack_zhgeqz (f08xs). In that case, QYQY and ZXZX are the left and right generalized eigenvectors, respectively, of the matrix pair supplied to nag_lapack_zhgeqz (f08xs).

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
Golub G H and Van Loan C F (1996) Matrix Computations (3rd Edition) Johns Hopkins University Press, Baltimore
Moler C B and Stewart G W (1973) An algorithm for generalized matrix eigenproblems SIAM J. Numer. Anal. 10 241–256
Stewart G W and Sun J-G (1990) Matrix Perturbation Theory Academic Press, London

Parameters

Compulsory Input Parameters

1:     side – string (length ≥ 1)
Specifies the required sets of generalized eigenvectors.
side = 'R'side='R'
Only right eigenvectors are computed.
side = 'L'side='L'
Only left eigenvectors are computed.
side = 'B'side='B'
Both left and right eigenvectors are computed.
Constraint: side = 'B'side='B', 'L''L' or 'R''R'.
2:     howmny – string (length ≥ 1)
Specifies further details of the required generalized eigenvectors.
howmny = 'A'howmny='A'
All right and/or left eigenvectors are computed.
howmny = 'B'howmny='B'
All right and/or left eigenvectors are computed; they are backtransformed using the input matrices supplied in arrays vr and/or vl.
howmny = 'S'howmny='S'
Selected right and/or left eigenvectors, defined by the array select, are computed.
Constraint: howmny = 'A'howmny='A', 'B''B' or 'S''S'.
3:     select( : :) – logical array
Note: the dimension of the array select must be at least max (1,n)max(1,n) if howmny = 'S'howmny='S', and at least 11 otherwise.
Specifies the eigenvectors to be computed if howmny = 'S'howmny='S'. To select the generalized eigenvector corresponding to the jjth generalized eigenvalue, the jjth element of select should be set to true.
Constraint: select(j) = trueselectj=true or falsefalse, for j = 1,2,,nj=1,2,,n.
4:     a(lda, : :) – complex 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 matrix AA must be in upper triangular form. Usually, this is the matrix AA returned by nag_lapack_zhgeqz (f08xs).
5:     b(ldb, : :) – complex array
The first dimension of the array b 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 matrix BB must be in upper triangular form with non-negative real diagonal elements. Usually, this is the matrix BB returned by nag_lapack_zhgeqz (f08xs).
6:     vl(ldvl, : :) – complex array
The first dimension, ldvl, of the array vl must satisfy
  • if side = 'L'side='L' or 'B''B', ldvl max (1,n) ldvl max(1,n) ;
  • if side = 'R'side='R', ldvl1ldvl1.
The second dimension of the array must be at least max (1,mm)max(1,mm) if side = 'L'side='L' or 'B''B' and at least 11 if side = 'R'side='R'
If howmny = 'B'howmny='B' and side = 'L'side='L' or 'B''B', vl must be initialized to an nn by nn matrix QQ. Usually, this is the unitary matrix QQ of left Schur vectors returned by nag_lapack_zhgeqz (f08xs).
7:     vr(ldvr, : :) – complex array
The first dimension, ldvr, of the array vr must satisfy
  • if side = 'R'side='R' or 'B''B', ldvr max (1,n) ldvr max(1,n) ;
  • if side = 'L'side='L', ldvr1ldvr1.
The second dimension of the array must be at least max (1,mm)max(1,mm) if side = 'R'side='R' or 'B''B' and at least 11 if side = 'L'side='L'
If howmny = 'B'howmny='B' and side = 'R'side='R' or 'B''B', vr must be initialized to an nn by nn matrix ZZ. Usually, this is the unitary matrix ZZ of right Schur vectors returned by nag_lapack_dhgeqz (f08xe).
8:     mm – int64int32nag_int scalar
The number of columns in the arrays vl and/or vr.
Constraints:
  • if howmny = 'A'howmny='A' or 'B''B', mmnmmn;
  • if howmny = 'S'howmny='S', mm must not be less than the number of requested eigenvectors.

Optional Input Parameters

1:     n – int64int32nag_int scalar
Default: The first dimension of the arrays vl, vr. (An error is raised if these dimensions are not equal.)
nn, the order of the matrices AA and BB.
Constraint: n0n0.

Input Parameters Omitted from the MATLAB Interface

lda ldb ldvl ldvr work rwork

Output Parameters

1:     vl(ldvl, : :) – complex array
The first dimension, ldvl, of the array vl will be
  • if side = 'L'side='L' or 'B''B', ldvl max (1,n) ldvl max(1,n) ;
  • if side = 'R'side='R', ldvl1ldvl1.
The second dimension of the array will be max (1,mm)max(1,mm) if side = 'L'side='L' or 'B''B' and at least 11 if side = 'R'side='R'
If side = 'L'side='L' or 'B''B', vl contains:
  • if howmny = 'A'howmny='A', the matrix YY of left eigenvectors of (A,B)(A,B);
  • if howmny = 'B'howmny='B', the matrix QYQY;
  • if howmny = 'S'howmny='S', the left eigenvectors of (A,B)(A,B) specified by select, stored consecutively in the columns of the array vl, in the same order as their corresponding eigenvalues.
2:     vr(ldvr, : :) – complex array
The first dimension, ldvr, of the array vr will be
  • if side = 'R'side='R' or 'B''B', ldvr max (1,n) ldvr max(1,n) ;
  • if side = 'L'side='L', ldvr1ldvr1.
The second dimension of the array will be max (1,mm)max(1,mm) if side = 'R'side='R' or 'B''B' and at least 11 if side = 'L'side='L'
If side = 'R'side='R' or 'B''B', vr contains:
  • if howmny = 'A'howmny='A', the matrix XX of right eigenvectors of (A,B)(A,B);
  • if howmny = 'B'howmny='B', the matrix ZXZX;
  • if howmny = 'S'howmny='S', the right eigenvectors of (A,B)(A,B) specified by select, stored consecutively in the columns of the array vr, in the same order as their corresponding eigenvalues.
3:     m – int64int32nag_int scalar
The number of columns in the arrays vl and/or vr actually used to store the eigenvectors. If howmny = 'A'howmny='A' or 'B''B', m is set to n. Each selected eigenvector occupies one column.
4:     info – int64int32nag_int scalar
info = 0info=0 unless the function detects an error (see Section [Error Indicators and Warnings]).

Error Indicators and Warnings

  info = iinfo=-i
If info = iinfo=-i, parameter ii had an illegal value on entry. The parameters are numbered as follows:
1: side, 2: howmny, 3: select, 4: n, 5: a, 6: lda, 7: b, 8: ldb, 9: vl, 10: ldvl, 11: vr, 12: ldvr, 13: mm, 14: m, 15: work, 16: rwork, 17: 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.

Accuracy

It is beyond the scope of this manual to summarise the accuracy of the solution of the generalized eigenvalue problem. Interested readers should consult Section 4.11 of the LAPACK Users' Guide (see Anderson et al. (1999)) and Chapter 6 of Stewart and Sun (1990).

Further Comments

nag_lapack_ztgevc (f08yx) is the sixth step in the solution of the complex generalized eigenvalue problem and is usually called after nag_lapack_zhgeqz (f08xs).
The real analogue of this function is nag_lapack_dtgevc (f08yk).

Example

function nag_lapack_ztgevc_example
side = 'B';
howmny = 'B';
select = [false];
a = [ -0.1438233530385224 + 0.3741062911974998i, ...
    1.619781251864666 + 0.5366170936785172i,  -5.73564259051686 - 3.142957175229123i, ...
      0.8798344594474423 + 2.121055303267389i;
      0 + 0i,  0.2823856561928724 + 0.5208777880043725i, ...
     0.8621110088889029 - 2.167166334598099i,  -3.106018675330553 + 1.841506903478952i;
      0 + 0i,  0 + 0i,  1.855074244893335 - 0.137336971784532i, ...
      -1.098834831815077 - 0.9880107323733596i;
      0 + 0i,  0 + 0i,  0 + 0i,  0.07048820152838613 - 0.1296769105942374i];
b = [0.2263375141379972,  -0.002717330036079723 - 0.7423473646116365i, ...
     -3.468409696159831 + 0.1539788635359557i,  0.7560522313684904 + 1.232848952545645i;
      0 + 0i,  0.5722925376877426 + 0i, ...
     0.5726907354403078 - 2.024908875044398i,  -3.138311880819062 + 1.830164861889475i;
      0 + 0i,  0 + 0i,  2.750626071820657 + 0i,  -1.220622047233075 - 1.233359591775969i;
      0 + 0i,  0 + 0i,  0 + 0i,  0.1539006001169547 + 0i];
vl = [ -0.7090128348336845 - 0.4614766052957729i, ...
    -0.03302144109782951 + 0.09031754537464898i,  -0.1628796424652455 - 0.4924480172799654i, ...
      0.07738808120167298 - 0.008290082415805335i;
      -0.4837138711442771 + 0.01888381070268117i, ...
    0.1585276550385831 + 0.2160986717612117i,  0.6753888500844341 + 0.4579080836762112i, ...
      -0.1663170609273306 + 0.0185300441734911i;
      0.01301179598327496 + 0.04484513137596133i, ...
    0.07439715940099263 + 0.2069093549321275i,  0.1013875542126264 + 0.09091777594277473i, ...
      0.9636186134385214 - 0.04865057630715362i;
      0.1975761880057718 + 0.09374269385944185i, ...
    -0.03434567875120977 + 0.9324144078370313i,  -0.0529966554546879 - 0.2092394246122108i, ...
      -0.1815547581349474 - 0.04525252686036998i];
vr = [ 0.1125541434588206 - 0.2530015045809291i, ...
    -0.8454652086827854 - 0.0439376337233772i,  0.3778872609370834 - 0.1354773959002216i, ...
      -0.1007041124568257 + 0.1878447328930133i;
      -0.1679732170998382 + 0.1870876653951373i, ...
    0.3287962269251304 + 0.1147271208604701i,  0.8540175661380118 - 0.1668164345930881i, ...
      -0.220993168644864 - 0.09747936182932303i;
      0.6207048630041609 - 0.6731519289895047i, ...
    0.2900654196264747 + 0.1373850965514047i,  0.08053884907529973 - 0.06748539251590967i, ...
      -0.08875151592027926 - 0.1991525172615823i;
      -0.08915551057292456 + 0.1172529562072554i, ...
    -0.2275026764742463 + 0.08496301506044719i,  -0.2211484305422954 - 0.1473972671191666i, ...
      -0.5421617631561396 - 0.744818700993698i];
mm = int64(4);
[vlOut, vrOut, m, info] = nag_lapack_ztgevc(side, howmny, select, a, b, vl, vr, mm)
 

vlOut =

  -0.2725 - 0.1776i   0.0474 + 0.0490i  -0.1146 - 0.1935i   0.0765 - 0.0082i
   0.2762 + 0.0441i  -0.1435 - 0.0529i   0.3578 + 0.2103i  -0.1643 + 0.0183i
  -0.9540 - 0.0460i   0.8642 + 0.1358i  -0.6773 - 0.3227i   0.9519 - 0.0481i
   0.1276 - 0.0192i  -0.1641 + 0.0312i   0.0941 + 0.0343i  -0.1794 - 0.0447i


vrOut =

   0.0870 - 0.1955i   0.0550 + 0.0318i  -0.5392 - 0.2697i   0.0467 - 0.0597i
  -0.1298 + 0.1446i  -0.1060 - 0.0705i   0.6027 + 0.1760i  -0.0801 + 0.0956i
   0.4797 - 0.5203i   0.6392 + 0.3608i  -0.7265 - 0.2735i   0.5616 - 0.4384i
  -0.0689 + 0.0906i  -0.1388 - 0.0303i  -0.0422 - 0.0065i  -0.1293 + 0.0420i


m =

                    4


info =

                    0


function f08yx_example
side = 'B';
howmny = 'B';
select = [false];
a = [ -0.1438233530385224 + 0.3741062911974998i, ...
    1.619781251864666 + 0.5366170936785172i,  -5.73564259051686 - 3.142957175229123i, ...
      0.8798344594474423 + 2.121055303267389i;
      0 + 0i,  0.2823856561928724 + 0.5208777880043725i, ...
     0.8621110088889029 - 2.167166334598099i,  -3.106018675330553 + 1.841506903478952i;
      0 + 0i,  0 + 0i,  1.855074244893335 - 0.137336971784532i, ...
      -1.098834831815077 - 0.9880107323733596i;
      0 + 0i,  0 + 0i,  0 + 0i,  0.07048820152838613 - 0.1296769105942374i];
b = [0.2263375141379972,  -0.002717330036079723 - 0.7423473646116365i, ...
     -3.468409696159831 + 0.1539788635359557i,  0.7560522313684904 + 1.232848952545645i;
      0 + 0i,  0.5722925376877426 + 0i, ...
     0.5726907354403078 - 2.024908875044398i,  -3.138311880819062 + 1.830164861889475i;
      0 + 0i,  0 + 0i,  2.750626071820657 + 0i,  -1.220622047233075 - 1.233359591775969i;
      0 + 0i,  0 + 0i,  0 + 0i,  0.1539006001169547 + 0i];
vl = [ -0.7090128348336845 - 0.4614766052957729i, ...
    -0.03302144109782951 + 0.09031754537464898i,  -0.1628796424652455 - 0.4924480172799654i, ...
      0.07738808120167298 - 0.008290082415805335i;
      -0.4837138711442771 + 0.01888381070268117i, ...
    0.1585276550385831 + 0.2160986717612117i,  0.6753888500844341 + 0.4579080836762112i, ...
      -0.1663170609273306 + 0.0185300441734911i;
      0.01301179598327496 + 0.04484513137596133i, ...
    0.07439715940099263 + 0.2069093549321275i,  0.1013875542126264 + 0.09091777594277473i, ...
      0.9636186134385214 - 0.04865057630715362i;
      0.1975761880057718 + 0.09374269385944185i, ...
    -0.03434567875120977 + 0.9324144078370313i,  -0.0529966554546879 - 0.2092394246122108i, ...
      -0.1815547581349474 - 0.04525252686036998i];
vr = [ 0.1125541434588206 - 0.2530015045809291i, ...
    -0.8454652086827854 - 0.0439376337233772i,  0.3778872609370834 - 0.1354773959002216i, ...
      -0.1007041124568257 + 0.1878447328930133i;
      -0.1679732170998382 + 0.1870876653951373i, ...
    0.3287962269251304 + 0.1147271208604701i,  0.8540175661380118 - 0.1668164345930881i, ...
      -0.220993168644864 - 0.09747936182932303i;
      0.6207048630041609 - 0.6731519289895047i, ...
    0.2900654196264747 + 0.1373850965514047i,  0.08053884907529973 - 0.06748539251590967i, ...
      -0.08875151592027926 - 0.1991525172615823i;
      -0.08915551057292456 + 0.1172529562072554i, ...
    -0.2275026764742463 + 0.08496301506044719i,  -0.2211484305422954 - 0.1473972671191666i, ...
      -0.5421617631561396 - 0.744818700993698i];
mm = int64(4);
[vlOut, vrOut, m, info] = f08yx(side, howmny, select, a, b, vl, vr, mm)
 

vlOut =

  -0.2725 - 0.1776i   0.0474 + 0.0490i  -0.1146 - 0.1935i   0.0765 - 0.0082i
   0.2762 + 0.0441i  -0.1435 - 0.0529i   0.3578 + 0.2103i  -0.1643 + 0.0183i
  -0.9540 - 0.0460i   0.8642 + 0.1358i  -0.6773 - 0.3227i   0.9519 - 0.0481i
   0.1276 - 0.0192i  -0.1641 + 0.0312i   0.0941 + 0.0343i  -0.1794 - 0.0447i


vrOut =

   0.0870 - 0.1955i   0.0550 + 0.0318i  -0.5392 - 0.2697i   0.0467 - 0.0597i
  -0.1298 + 0.1446i  -0.1060 - 0.0705i   0.6027 + 0.1760i  -0.0801 + 0.0956i
   0.4797 - 0.5203i   0.6392 + 0.3608i  -0.7265 - 0.2735i   0.5616 - 0.4384i
  -0.0689 + 0.0906i  -0.1388 - 0.0303i  -0.0422 - 0.0065i  -0.1293 + 0.0420i


m =

                    4


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