|
NAG[f02agc] NAG[nag_real_eigensystem] - All eigenvalues and eigenvectors of real matrix
|
|
Calling Sequence
f02agc(a, r, v, iter, 'n'=n, 'tda'=tda, 'tdv'=tdv, 'fail'=fail)
nag_real_eigensystem(. . .)
Parameters
|
a - Matrix(1..n, 1..tda, datatype=float[8], order=C_order);
|
|
|
On exit: the array is overwritten.
|
|
|
r - Vector(1..n, datatype=complex[8]);
|
|
|
On exit: the eigenvalues.
|
|
|
v - Matrix(1..n, 1..tdv, datatype=complex[8], order=C_order);
|
|
|
On exit: the eigenvectors, stored by columns. The th column corresponds to the th eigenvalue. The eigenvectors are normalized so that the sum of the squares of the moduli of the elements is equal to 1 and the element of largest modulus is real. This ensures that real eigenvalues have real eigenvectors.
|
|
|
iter - Vector(1..n, datatype=integer[kernelopts('wordsize')/8]);
|
|
|
Note: the eigenvalues are found in reverse order, starting with the th.
|
|
|
'n'=n - integer; (optional)
|
|
|
Default value: the first dimension of the arrays a, r, v, iter and the second dimension of the arrays a, r, v, iterthe arrays a, v.
|
|
On entry: , the order of the matrix .
|
|
Constraint: . .
|
|
|
'tda'=tda - integer; (optional)
|
|
|
On entry: the second dimension of the array a as declared in the function from which nag_real_eigensystem (f02agc) is called.
|
|
Constraint: . .
|
|
|
'tdv'=tdv - integer; (optional)
|
|
|
On entry: the second dimension of the array v as declared in the function from which nag_real_eigensystem (f02agc) is called.
|
|
Constraint: . .
|
|
|
'fail'=fail - table; (optional)
|
|
|
The NAG error argument, see the documentation for NagError.
|
|
|
|
Description
|
|
|
Purpose
|
|
nag_real_eigensystem (f02agc) calculates all the eigenvalues and eigenvectors of a real unsymmetric matrix.
|
|
Description
|
|
The matrix is first balanced and then reduced to upper Hessenberg form using real stabilised elementary similarity transformations. The eigenvalues and eigenvectors of the Hessenberg matrix are calculated using the algorithm. The eigenvectors of the Hessenberg matrix are back-transformed to give the eigenvectors of the original matrix .
|
|
Error Indicators and Warnings
|
|
"NE_ALLOC_FAIL"
Dynamic memory allocation failed.
"NE_INT_ARG_LT"
On entry, n must not be less than 1: .
"NE_TOO_MANY_ITERATIONS"
More than iterations are required to isolate all the eigenvalues.
|
|
Accuracy
|
|
The accuracy of the results depends on the original matrix and the multiplicity of the roots. For a detailed error analysis see pages 352 and 390 Wilkinson and Reinsch (1971).
|
|
Further Comments
|
|
The time taken by nag_real_eigensystem (f02agc) is approximately proportional to .
|
|
|
Examples
|
|
>
|
n := 4:
tda := 4:
tdv := 4:
a := Matrix([[1.5, 0.1, 4.5, -1.5], [-22.5, 3.5, 12.5, -2.5], [-2.5, 0.3, 4.5, -2.5], [-2.5, 0.1, 4.5, 2.5]], datatype=float[8], order='C_order'):
r := Vector(4, datatype=complex[8]):
v := Matrix(4, 4, datatype=complex[8], order='C_order'):
iter := Vector(4, datatype=integer[kernelopts('wordsize')/8]):
NAG:-f02agc(a, r, v, iter, 'n' = n, 'tda' = tda, 'tdv' = tdv):
|

|
|