PDF version (NAG web site
, 64-bit version, 64-bit version)
NAG Toolbox: nag_lapack_dtgsyl (f08yh)
Purpose
nag_lapack_dtgsyl (f08yh) solves the generalized real quasi-triangular Sylvester equations.
Syntax
[
c,
f,
scale,
dif,
info] = f08yh(
trans,
ijob,
a,
b,
c,
d,
e,
f, 'm',
m, 'n',
n)
[
c,
f,
scale,
dif,
info] = nag_lapack_dtgsyl(
trans,
ijob,
a,
b,
c,
d,
e,
f, 'm',
m, 'n',
n)
Description
nag_lapack_dtgsyl (f08yh) solves either the generalized real Sylvester equations
or the equations
where the pair
are given
by
matrices in real generalized Schur form,
are given
by
matrices in real generalized Schur form and
are given
by
matrices. The pair
are the
by
solution matrices, and
is an output scaling factor determined by the function to avoid overflow in computing
.
Equations
(1) are equivalent to equations of the form
where
and
is the Kronecker product. Equations
(2) are then equivalent to
The pair
are in real generalized Schur form if
is block upper triangular with
by
and
by
diagonal blocks on the diagonal and
is upper triangular as returned, for example, by
nag_lapack_dgges (f08xa), or
nag_lapack_dhgeqz (f08xe) with
.
Optionally, the function estimates
, the separation between the matrix pairs
and
, which is the smallest singular value of
. The estimate can be based on either the Frobenius norm, or the
-norm. The
-norm estimate can be three to ten times more expensive than the Frobenius norm estimate, but makes the condition estimation uniform with the nonsymmetric eigenproblem. The Frobenius norm estimate provides a low cost, but equally reliable estimate. For more information see Sections 2.4.8.3 and 4.11.1.3 of
Anderson et al. (1999) and
Kågström and Poromaa (1996).
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
Kågström B (1994) A perturbation analysis of the generalized Sylvester equation SIAM J. Matrix Anal. Appl. 15 1045–1060
Kågström B and Poromaa P (1996) LAPACK-style algorithms and software for solving the generalized Sylvester equation and estimating the separation between regular matrix pairs ACM Trans. Math. Software 22 78–103
Parameters
Compulsory Input Parameters
- 1:
– string (length ≥ 1)
-
If
, solve the generalized Sylvester equation
(1).
If
, solve the ‘transposed’ system
(2).
Constraint:
or .
- 2:
– int64int32nag_int scalar
-
Specifies what kind of functionality is to be performed when
.
- Solve (1) only.
- The functionality of and .
- The functionality of and .
- Only an estimate of is computed based on the Frobenius norm.
- Only an estimate of is computed based on the -norm.
If
,
ijob is not referenced.
Constraint:
if , .
- 3:
– double array
-
The first dimension of the array
a must be at least
.
The second dimension of the array
a must be at least
.
The upper quasi-triangular matrix .
- 4:
– double array
-
The first dimension of the array
b must be at least
.
The second dimension of the array
b must be at least
.
The upper quasi-triangular matrix .
- 5:
– double array
-
The first dimension of the array
c must be at least
.
The second dimension of the array
c must be at least
.
Contains the right-hand-side matrix .
- 6:
– double array
-
The first dimension of the array
d must be at least
.
The second dimension of the array
d must be at least
.
The upper triangular matrix .
- 7:
– double array
-
The first dimension of the array
e must be at least
.
The second dimension of the array
e must be at least
.
The upper triangular matrix .
- 8:
– double array
-
The first dimension of the array
f must be at least
.
The second dimension of the array
f must be at least
.
Contains the right-hand side matrix .
Optional Input Parameters
- 1:
– int64int32nag_int scalar
-
Default:
the first dimension of the arrays
a,
c,
d,
f and the second dimension of the arrays
a,
d.
, the order of the matrices and , and the row dimension of the matrices , , and .
Constraint:
.
- 2:
– int64int32nag_int scalar
-
Default:
the first dimension of the arrays
b,
e and the second dimension of the arrays
b,
c,
e,
f.
, the order of the matrices and , and the column dimension of the matrices , , and .
Constraint:
.
Output Parameters
- 1:
– double array
-
The first dimension of the array
c will be
.
The second dimension of the array
c will be
.
If
,
or
,
c stores the solution matrix
.
If
and
or
,
c holds
, the solution achieved during the computation of the Dif estimate.
- 2:
– double array
-
The first dimension of the array
f will be
.
The second dimension of the array
f will be
.
If
,
or
,
f stores the solution matrix
.
If
and
or
,
f holds
, the solution achieved during the computation of the Dif estimate.
- 3:
– double scalar
-
, the scaling factor in
(1) or
(2).
If
,
c and
f hold the solutions
and
, respectively, to a slightly perturbed system but the input arrays
a,
b,
d and
e have not been changed.
If
,
c and
f hold the solutions
and
, respectively, to the homogeneous system with
. In this case
dif is not referenced.
Normally, .
- 4:
– double scalar
-
The estimate of
. If
,
dif is not referenced.
- 5:
– 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:
trans, 2:
ijob, 3:
m, 4:
n, 5:
a, 6:
lda, 7:
b, 8:
ldb, 9:
c, 10:
ldc, 11:
d, 12:
ldd, 13:
e, 14:
lde, 15:
f, 16:
ldf, 17:
scale, 18:
dif, 19:
work, 20:
lwork, 21:
iwork, 22:
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.
-
-
and have common or close eigenvalues and so no solution could be computed.
Accuracy
See
Kågström (1994) for a perturbation analysis of the generalized Sylvester equation.
Further Comments
The total number of floating-point operations needed to solve the generalized Sylvester equations is approximately . The Frobenius norm estimate of does not require additional significant computation, but the -norm estimate is typically five times more expensive.
The complex analogue of this function is
nag_lapack_ztgsyl (f08yv).
Example
This example solves the generalized Sylvester equations
where
Open in the MATLAB editor:
f08yh_example
function f08yh_example
fprintf('f08yh example results\n\n');
A = [4, 1, 1, 2;
0, 3, 4, 1;
0, 1, 3, 1;
0, 0, 0, 6];
D = [2, 1, 1, 3;
0, 1, 2, 1;
0, 0, 1, 1;
0, 0, 0, 2];
B = [1, 1, 1, 1;
0, 3, 4, 1;
0, 1, 3, 1;
0, 0, 0, 4];
E = [1, 1, 1, 2;
0, 1, 4, 1;
0, 0, 1, 1;
0, 0, 0, 1];
C = [-4, 7, 1, 12;
-9, 2, -2, -2;
-4, 2, -2, 8;
-7, 7, -6, 19];
F = [-7, 5, 0, 7;
-5, 1, -8, 0;
-1, 2, -3, 5;
-3, 2, 0, 5];
trans = 'No transpose';
ijob = int64(0);
[R, L, alpha, ~, info] = f08yh( ...
trans, ijob, A, B, C, D, E, F);
[ifail] = x04ca( ...
'Gen', ' ', R, 'Solution matrix R');
fprintf('\n');
[ifail] = x04ca( ...
'Gen', ' ', L, 'Solution matrix L');
fprintf('\nalpha = %10.2e\n', alpha);
f08yh example results
Solution matrix R
1 2 3 4
1 1.0000 1.0000 1.0000 1.0000
2 -1.0000 2.0000 -1.0000 -1.0000
3 -1.0000 1.0000 3.0000 1.0000
4 -1.0000 1.0000 -1.0000 4.0000
Solution matrix L
1 2 3 4
1 4.0000 -1.0000 1.0000 -1.0000
2 1.0000 3.0000 -1.0000 1.0000
3 -1.0000 1.0000 2.0000 -1.0000
4 1.0000 -1.0000 1.0000 1.0000
alpha = 1.00e+00
PDF version (NAG web site
, 64-bit version, 64-bit version)
© The Numerical Algorithms Group Ltd, Oxford, UK. 2009–2015