|
NAG[f08qkc] NAG[nag_dtrevc] - Left and right eigenvectors of real upper quasi-triangular matrix
|
|
Calling Sequence
f08qkc(side, how_many, select, t, vl, vr, m, 'n'=n, 'mm'=mm, 'fail'=fail)
nag_dtrevc(. . .)
Parameters
|
side - String;
|
|
|
On entry: indicates whether left and/or right eigenvectors are to be computed.
|
|
Only right eigenvectors are computed.
|
|
Only left eigenvectors are computed.
|
|
Both left and right eigenvectors are computed.
|
|
Constraint: "Nag_RightSide", "Nag_LeftSide" or "Nag_BothSides". .
|
|
|
how_many - String;
|
|
|
On entry: indicates how many eigenvectors are to be computed.
|
|
All eigenvectors (as specified by side) are computed.
|
|
Selected eigenvectors (as specified by side and select) are computed.
|
|
Constraint: "Nag_ComputeAll", , "Nag_BackTransform" or "Nag_ComputeSelected". .
|
|
|
select - Vector(1..dim, datatype=boolean);
|
|
|
Note: the dimension, dim, of the array select must be at least
|
|
when ;
|
|
otherwise.
|
|
On exit: if a complex eigenvector was selected as specified above, then is set to true and to false.
|
|
If "Nag_ComputeAll", or "Nag_BackTransform", select is not referenced.
|
|
|
t - Matrix(1..dim1, 1..dim2, datatype=float[8], order=order);
|
|
|
Note: this array may be supplied in Fortran_order or C_order , as specified by order. All array parameters must use a consistent order.
|
|
|
vl - Matrix(1..dim1, 1..dim2, datatype=float[8], order=order);
|
|
|
Note: this array may be supplied in Fortran_order or C_order , as specified by order. All array parameters must use a consistent order.
|
|
If "Nag_ComputeAll" or "Nag_ComputeSelected", vl need not be set.
|
|
On exit: if "Nag_LeftSide" or "Nag_BothSides", vl contains the computed left eigenvectors (as specified by how_many and select). The eigenvectors are stored consecutively in the rows or columns of the array, in the same order as their eigenvalues. Corresponding to each real eigenvalue is a real eigenvector, occupying one row or column. Corresponding to each complex conjugate pair of eigenvalues, is a complex eigenvector occupying two rows or columns; the first row or column holds the real part and the second row or column holds the imaginary part.
|
|
If , vl is not referenced.
|
|
|
vr - Matrix(1..dim1, 1..dim2, datatype=float[8], order=order);
|
|
|
Note: this array may be supplied in Fortran_order or C_order , as specified by order. All array parameters must use a consistent order.
|
|
If "Nag_ComputeAll" or "Nag_ComputeSelected", vr need not be set.
|
|
On exit: if "Nag_RightSide" or "Nag_BothSides", vr contains the computed right eigenvectors (as specified by how_many and select). The eigenvectors are stored consecutively in the rows or columns of the array, in the same order as their eigenvalues. Corresponding to each real eigenvalue is a real eigenvector, occupying one row or column. Corresponding to each complex conjugate pair of eigenvalues, is a complex eigenvector occupying two rows or columns; the first row or column holds the real part and the second row or column holds the imaginary part.
|
|
If , vr is not referenced.
|
|
|
m - assignable;
|
|
|
Note: On exit the variable m will have a value of type integer.
|
|
|
'n'=n - integer; (optional)
|
|
|
Default value: the dimension of the array t.
|
|
On entry: , the order of the matrix .
|
|
Constraint: . .
|
|
|
'mm'=mm - integer; (optional)
|
|
|
Default value: the second dimension of the arrays vl, vr.
|
|
Constraint: . .
|
|
|
'fail'=fail - table; (optional)
|
|
|
The NAG error argument, see the documentation for NagError.
|
|
|
|
Description
|
|
|
Purpose
|
|
nag_dtrevc (f08qkc) computes selected left and/or right eigenvectors of a real upper quasi-triangular matrix.
|
|
Description
|
|
nag_dtrevc (f08qkc) computes left and/or right eigenvectors of a real upper quasi-triangular matrix in canonical Schur form. Such a matrix arises from the Schur factorization of a real general matrix, as computed by f08pec (nag_dhseqr), for example.
The right eigenvector , and the left eigenvector , corresponding to an eigenvalue , are defined by:
Note that even though is real, , and may be complex. If is an eigenvector corresponding to a complex eigenvalue , then the complex conjugate vector is the eigenvector corresponding to the complex conjugate eigenvalue .
The function can compute the eigenvectors corresponding to selected eigenvalues, or it can compute all the eigenvectors. In the latter case the eigenvectors may optionally be pre-multiplied by an input matrix . Normally is an orthogonal matrix from the Schur factorization of a matrix as ; if is a (left or right) eigenvector of , then is an eigenvector of .
The eigenvectors are computed by forward or backward substitution. They are scaled so that, for a real eigenvector , , and for a complex eigenvector, .
|
|
Error Indicators and Warnings
|
|
"NE_ALLOC_FAIL"
Dynamic memory allocation failed.
"NE_BAD_PARAM"
On entry, argument had an illegal value.
"NE_INT"
On entry, . Constraint: , where is obtained by counting 1 for each selected real eigenvector and 2 for each selected complex eigenvector.
On entry, . Constraint: .
"NE_INTERNAL_ERROR"
An internal error has occurred in this function. Check the function call and any array sizes. If the call is correct then please consult NAG for assistance.
|
|
Accuracy
|
|
If is an exact right eigenvector, and is the corresponding computed eigenvector, then the angle between them is bounded as follows:
where is the reciprocal condition number of .
The condition number may be computed by calling f08qlc (nag_dtrsna).
|
|
|
Examples
|
|
>
|
side := "Nag_BothSides":
how_many := "Nag_ComputeAll":
n := 4:
mm := 4:
selector := Vector([false], datatype=boolean):
t := Matrix([[0.7995, -0.1144, 0.006, 0.0336], [0, -0.0994, 0.2478, 0.3474], [0, -0.6483, -0.0994, 0.2026], [0, 0, 0, -0.1007]], datatype=float[8]):
vl := Matrix([[0, 0, 0, 0], [0, 0, 0, 0], [0, 0, 0, 0], [0, 0, 0, 0]], datatype=float[8]):
vr := Matrix([[0, 0, 0, 0], [0, 0, 0, 0], [0, 0, 0, 0], [0, 0, 0, 0]], datatype=float[8]):
NAG:-f08qkc(side, how_many, selector, t, vl, vr, m, 'n' = n, 'mm' = mm):
|
|
|