|
NAG[f02afc] NAG[nag_real_eigenvalues] - All eigenvalues of real matrix
|
|
Calling Sequence
f02afc(a, r, iter, 'n'=n, 'tda'=tda, 'fail'=fail)
nag_real_eigenvalues(. . .)
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.
|
|
|
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, iter and the second dimension of the arrays a, r, iterthe array a.
|
|
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_eigenvalues (f02afc) is called.
|
|
Constraint: . .
|
|
|
'fail'=fail - table; (optional)
|
|
|
The NAG error argument, see the documentation for NagError.
|
|
|
|
Description
|
|
|
Purpose
|
|
nag_real_eigenvalues (f02afc) calculates all the eigenvalues of a real unsymmetric matrix.
|
|
Description
|
|
The matrix is first balanced and then reduced to upper Hessenberg form using stabilised elementary similarity transformations. The eigenvalues are then found using the algorithm for real Hessenberg matrices.
|
|
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 367 Wilkinson and Reinsch (1971).
|
|
Further Comments
|
|
The time taken by nag_real_eigenvalues (f02afc) is approximately proportional to .
|
|
|
Examples
|
|
>
|
n := 4:
tda := 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]):
iter := Vector(4, datatype=integer[kernelopts('wordsize')/8]):
NAG:-f02afc(a, r, iter, 'n' = n, 'tda' = tda):
|
|
|