PDF version (NAG web site
, 64-bit version, 64-bit version)
NAG Toolbox: nag_lapack_ztgexc (f08yt)
Purpose
nag_lapack_ztgexc (f08yt) reorders the generalized Schur factorization of a complex matrix pair in generalized Schur form.
Syntax
[
a,
b,
q,
z,
ilst,
info] = f08yt(
wantq,
wantz,
a,
b,
q,
z,
ifst,
ilst, 'n',
n)
[
a,
b,
q,
z,
ilst,
info] = nag_lapack_ztgexc(
wantq,
wantz,
a,
b,
q,
z,
ifst,
ilst, 'n',
n)
Description
nag_lapack_ztgexc (f08yt) reorders the generalized complex
by
matrix pair
in generalized Schur form, so that the diagonal element of
with row index
is moved to row
, using a unitary equivalence transformation. That is,
and
are factorized as
where
are also in generalized Schur form.
The pair
are in generalized Schur form if
and
are upper triangular as returned, for example, by
nag_lapack_zgges (f08xn), or
nag_lapack_zhgeqz (f08xs) with
.
If
and
are the result of a generalized Schur factorization of a matrix pair
then, optionally, the matrices
and
can be updated as
and
.
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
Parameters
Compulsory Input Parameters
- 1:
– logical scalar
-
If
, update the left transformation matrix
.
If , do not update .
- 2:
– logical scalar
-
If
, update the right transformation matrix
.
If , do not update .
- 3:
– 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 matrix in the pair .
- 4:
– complex array
-
The first dimension of the array
b must be at least
.
The second dimension of the array
b must be at least
.
The matrix , in the pair .
- 5:
– complex array
-
The first dimension,
, of the array
q must satisfy
- if , ;
- otherwise .
The second dimension of the array
q must be at least
if
, and at least
otherwise.
If , the unitary matrix .
- 6:
– complex array
-
The first dimension,
, of the array
z must satisfy
- if , ;
- otherwise .
The second dimension of the array
z must be at least
if
, and at least
otherwise.
If , the unitary matrix .
- 7:
– int64int32nag_int scalar
- 8:
– int64int32nag_int scalar
-
The indices
and
that specify the reordering of the diagonal elements of
. The element with row index
ifst is moved to row
ilst, by a sequence of swapping between adjacent diagonal elements.
Constraint:
and .
Optional Input Parameters
- 1:
– int64int32nag_int scalar
-
Default:
the first dimension of the arrays
a,
b and the second dimension of the arrays
a,
b. (An error is raised if these dimensions are not equal.)
, the order of the matrices and .
Constraint:
.
Output Parameters
- 1:
– complex array
-
The first dimension of the array
a will be
.
The second dimension of the array
a will be
.
The updated matrix .
- 2:
– complex array
-
The first dimension of the array
b will be
.
The second dimension of the array
b will be
.
The updated matrix
- 3:
– complex array
-
The first dimension,
, of the array
q will be
- if , ;
- otherwise .
The second dimension of the array
q will be
if
and
otherwise.
If
, the updated matrix
.
If
,
q is not referenced.
- 4:
– complex array
-
The first dimension,
, of the array
z will be
- if , ;
- otherwise .
The second dimension of the array
z will be
if
and
otherwise.
If
, the updated matrix
.
If
,
z is not referenced.
- 5:
– int64int32nag_int scalar
-
ilst points to the row in its final position.
- 6:
– 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:
wantq, 2:
wantz, 3:
n, 4:
a, 5:
lda, 6:
b, 7:
ldb, 8:
q, 9:
ldq, 10:
z, 11:
ldz, 12:
ifst, 13:
ilst, 14:
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.
-
-
The transformed matrix pair
would be too far from generalized Schur form; the problem is ill-conditioned.
may have been partially reordered, and
ilst points to the first row of the current position of the block being moved.
Accuracy
The computed generalized Schur form is nearly the exact generalized Schur form for nearby matrices
and
, where
and
is the
machine precision. See Section 4.11 of
Anderson et al. (1999) for further details of error bounds for the generalized nonsymmetric eigenproblem.
Further Comments
The real analogue of this function is
nag_lapack_dtgexc (f08yf).
Example
This example exchanges rows 4 and 1 of the matrix pair
, where
and
Open in the MATLAB editor:
f08yt_example
function f08yt_example
fprintf('f08yt example results\n\n');
s = [ 4 + 4i, 1 + 1i, 1 + 1i, 2 - 1i;
0 + 0i, 2 + 1i, 1 + 1i, 1 + 1i;
0 + 0i, 0 + 0i, 2 - 1i, 1 + 1i;
0 + 0i, 0 + 0i, 0 + 0i, 6 - 2i];
t = [ 2, 1 + 1i, 1 + 1i, 3 - 1i;
0 + 0i, 1 + 0i, 2 + 1i, 1 + 1i;
0 + 0i, 0 + 0i, 1 + 0i, 1 + 1i;
0 + 0i, 0 + 0i, 0 + 0i, 2 + 0i];
wantq = false;
wantz = false;
q = complex(zeros(1, 4));
z = complex(zeros(1, 4));
ifst = int64(1);
ilst = int64(4);
[s, t, q, z, ilst, info] = ...
f08yt( ...
wantq, wantz, s, t, q, z, ifst, ilst);
disp('Reordered Schur matrix S');
disp(s);
disp('Reordered Schur matrix T');
disp(t);
f08yt example results
Reordered Schur matrix S
3.7081 + 3.7081i -2.0834 - 0.5688i 2.6374 + 1.0772i 0.2845 + 0.7991i
0.0000 + 0.0000i 1.6097 + 1.5656i -0.0634 + 1.9234i -0.0301 + 0.9720i
0.0000 + 0.0000i 0.0000 + 0.0000i 4.7029 - 2.1187i 1.1379 - 3.1199i
0.0000 + 0.0000i 0.0000 + 0.0000i 0.0000 + 0.0000i 2.3085 - 1.8289i
Reordered Schur matrix T
2.2249 + 0.7416i -1.1631 + 1.5347i 2.2608 + 2.0851i 1.1094 - 0.3205i
0.0000 + 0.0000i 0.3308 + 0.9482i 0.3919 + 1.8172i -0.6305 + 1.6053i
0.0000 + 0.0000i 0.0000 + 0.0000i 1.6227 - 0.1653i 0.9966 - 0.9074i
0.0000 + 0.0000i 0.0000 + 0.0000i 0.0000 + 0.0000i 0.1199 - 1.0343i
PDF version (NAG web site
, 64-bit version, 64-bit version)
© The Numerical Algorithms Group Ltd, Oxford, UK. 2009–2015