PDF version (NAG web site
, 64-bit version, 64-bit version)
NAG Toolbox: nag_lapack_zgees (f08pn)
Purpose
nag_lapack_zgees (f08pn) computes the eigenvalues, the Schur form , and, optionally, the matrix of Schur vectors for an by complex nonsymmetric matrix .
Syntax
Description
The Schur factorization of
is given by
where
, the matrix of Schur vectors, is unitary and
is the Schur form. A complex matrix is in Schur form if it is upper triangular.
Optionally, nag_lapack_zgees (f08pn) also orders the eigenvalues on the diagonal of the Schur form so that selected eigenvalues are at the top left. The leading columns of form an orthonormal basis for the invariant subspace corresponding to the selected eigenvalues.
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:
– string (length ≥ 1)
-
If
, Schur vectors are not computed.
If , Schur vectors are computed.
Constraint:
or .
- 2:
– string (length ≥ 1)
-
Specifies whether or not to order the eigenvalues on the diagonal of the Schur form.
- Eigenvalues are not ordered.
- Eigenvalues are ordered (see select).
Constraint:
or .
- 3:
– function handle or string containing name of m-file
-
If
,
select is used to select eigenvalues to sort to the top left of the Schur form.
If
,
select is not referenced and
nag_lapack_zgees (f08pn) may be called with the string
'f08pnz'.
An eigenvalue is selected if is true.
[result] = select(w)
Input Parameters
- 1:
– complex scalar
-
The real and imaginary parts of the eigenvalue.
Output Parameters
- 1:
– logical scalar
-
for selected eigenvalues.
- 4:
– complex array
-
The first dimension of the array
a must be at least
.
The second dimension of the array
a must be at least
.
The by matrix .
Optional Input Parameters
- 1:
– 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.)
, the order of the matrix .
Constraint:
.
Output Parameters
- 1:
– complex array
-
The first dimension of the array
a will be
.
The second dimension of the array
a will be
.
a stores its Schur form
.
- 2:
– int64int32nag_int scalar
-
If
,
.
If
,
number of eigenvalues for which
select is
true.
- 3:
– complex array
-
The dimension of the array
w will be
Contains the computed eigenvalues, in the same order that they appear on the diagonal of the output Schur form .
- 4:
– complex array
-
The first dimension,
, of the array
vs will be
- if , ;
- otherwise .
The second dimension of the array
vs will be
if
and
otherwise.
If
,
vs contains the unitary matrix
of Schur vectors.
If
,
vs is not referenced.
- 5:
– int64int32nag_int scalar
unless the function detects an error (see
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.
-
If , parameter had an illegal value on entry. The parameters are numbered as follows:
1:
jobvs, 2:
sort, 3:
select, 4:
n, 5:
a, 6:
lda, 7:
sdim, 8:
w, 9:
vs, 10:
ldvs, 11:
work, 12:
lwork, 13:
rwork, 14:
bwork, 15:
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.
-
-
If and , the algorithm failed to compute all the eigenvalues.
- W
-
The eigenvalues could not be reordered because some eigenvalues were too close to separate (the problem is very ill-conditioned).
- W
-
After reordering, roundoff changed values of some complex eigenvalues so that leading eigenvalues in the Schur form no longer satisfy . This could also be caused by underflow due to scaling.
Accuracy
The computed Schur factorization satisfies
where
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 .
The real analogue of this function is
nag_lapack_dgees (f08pa).
Example
This example finds the Schur factorization of the matrix
Note that the block size (NB) of assumed in this example is not realistic for such a small problem, but should be suitable for large problems.
Open in the MATLAB editor:
f08pn_example
function f08pn_example
fprintf('f08pn example results\n\n');
a = [-3.97 - 5.04i, -4.11 + 3.70i, -0.34 + 1.01i, 1.29 - 0.86i;
0.34 - 1.50i, 1.52 - 0.43i, 1.88 - 5.38i, 3.36 + 0.65i;
3.31 - 3.85i, 2.50 + 3.45i, 0.88 - 1.08i, 0.64 - 1.48i;
-1.10 + 0.82i, 1.81 - 1.59i, 3.25 + 1.33i, 1.57 - 3.44i];
jobvs = 'Vectors (Schur)';
sortp = 'No sort';
[~, sdim, w, ~, info] = f08pn( ...
jobvs, sortp, @select, a);
disp('Eigenvalues');
disp(w);
f08pn example results
Eigenvalues
-6.0004 - 6.9998i
-5.0000 + 2.0060i
7.9982 - 0.9964i
3.0023 - 3.9998i
PDF version (NAG web site
, 64-bit version, 64-bit version)
© The Numerical Algorithms Group Ltd, Oxford, UK. 2009–2015