PDF version (NAG web site
, 64-bit version, 64-bit version)
NAG Toolbox: nag_lapack_ztrexc (f08qt)
Purpose
nag_lapack_ztrexc (f08qt) reorders the Schur factorization of a complex general matrix.
Syntax
Description
nag_lapack_ztrexc (f08qt) reorders the Schur factorization of a complex general matrix
, so that the diagonal element of
with row index
ifst is moved to row
ilst.
The reordered Schur form is computed by a unitary similarity transformation: . Optionally the updated matrix of Schur vectors is computed as , giving .
References
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)
-
Indicates whether the matrix
of Schur vectors is to be updated.
- The matrix of Schur vectors is updated.
- No Schur vectors are updated.
Constraint:
or .
- 2:
– complex array
-
The first dimension of the array
t must be at least
.
The second dimension of the array
t must be at least
.
The
by
upper triangular matrix
, as returned by
nag_lapack_zhseqr (f08ps).
- 3:
– complex array
-
The first dimension,
, of the array
q must satisfy
- if , ;
- if , .
The second dimension of the array
q must be at least
if
and at least
if
.
If
,
q must contain the
by
unitary matrix
of Schur vectors.
- 4:
– int64int32nag_int scalar
- 5:
– int64int32nag_int scalar
-
ifst and
ilst must specify the reordering of the diagonal elements of
. The element with row index
ifst is moved to row
ilst by a sequence of exchanges between adjacent elements.
Constraint:
and .
Optional Input Parameters
- 1:
– int64int32nag_int scalar
-
Default:
the first dimension of the array
t and the second dimension of the array
t. (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
t will be
.
The second dimension of the array
t will be
.
t stores the updated matrix
.
- 2:
– complex array
-
The first dimension,
, of the array
q will be
- if , ;
- if , .
The second dimension of the array
q will be
if
and at least
if
.
If
,
q contains the updated matrix of Schur vectors.
If
,
q is not referenced.
- 3:
– int64int32nag_int scalar
unless the function detects an error (see
Error Indicators and Warnings).
Error Indicators and Warnings
-
If , parameter had an illegal value on entry. The parameters are numbered as follows:
1:
compq, 2:
n, 3:
t, 4:
ldt, 5:
q, 6:
ldq, 7:
ifst, 8:
ilst, 9:
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
The computed matrix
is exactly similar to a matrix
, where
and
is the
machine precision.
The values of the eigenvalues are never changed by the reordering.
Further Comments
The total number of real floating-point operations is approximately if , and if , where .
The real analogue of this function is
nag_lapack_dtrexc (f08qf).
Example
This example reorders the Schur factorization of the matrix
so that element
is moved to
, where
Open in the MATLAB editor:
f08qt_example
function f08qt_example
fprintf('f08qt example results\n\n');
t = [-6 - 7i, 0.36 - 0.36i, -0.19 + 0.48i, 0.88 - 0.25i;
0 + 0i, -5 + 2i, -0.03 - 0.72i, -0.23 + 0.13i;
0 + 0i, 0 + 0i, 8 - 1i, 0.94 + 0.53i;
0 + 0i, 0 + 0i, 0 + 0i, 3 - 4i];
compq = 'No update';
q = [complex(0)];
ifst = int64(1);
ilst = int64(4);
[t, q, info] = f08qt( ...
compq, t, q, ifst, ilst);
mtitle = 'Reordered Schur Form';
ncols = int64(80);
indent = int64(0);
[ifail] = x04db( ...
'Gen', ' ', t, 'Brac', 'F7.4', mtitle, ...
'Int', 'Int', ncols, indent);
f08qt example results
Reordered Schur Form
1 2 3 4
1 (-5.0000, 2.0000) (-0.1574, 0.7143) ( 0.1781,-0.1913) ( 0.3950, 0.3861)
2 ( 0.0000, 0.0000) ( 8.0000,-1.0000) ( 1.0742, 0.1447) ( 0.2515,-0.3397)
3 ( 0.0000, 0.0000) ( 0.0000, 0.0000) ( 3.0000,-4.0000) ( 0.2264, 0.8962)
4 ( 0.0000, 0.0000) ( 0.0000, 0.0000) ( 0.0000, 0.0000) (-6.0000,-7.0000)
PDF version (NAG web site
, 64-bit version, 64-bit version)
© The Numerical Algorithms Group Ltd, Oxford, UK. 2009–2015