Varkon MBS Programmers manual
Low level routine computes real eigen values and eigen vectors of an NxN real non-symmetric matrix.
The function depends on LAPACK and BLAS libraries , be sure they installed into your system.
status:=eigasym(n,m,eigval,evec);
| INT | status; |
| INT | n; |
| FLOAT | m(n); |
| FLOAT | eigval(n); |
| VECTOR | evec(n); |
| n | - The order of matrix "m" |
| m | - One dimension array, stores elements of an NxN matrix |
| eigval | - One dimension array, stores the real eigenvalues of the matrix "m" |
| evec | - One dimension array, stores the real eigenvectors of the matrix "m", one after one in the same order as their eigenvalues. |
None.
| 0 | => | Operation is successful. |
| > 0 | => | The QR algorithm faild to compute all the eigenvalues, and no eigenvectors have been computed, (lapack lib. error). |
| -1 | => | One of dgeev function's parameters has illegal value, (lapack lib. error). |
| -2 | => | One or more of the eigenvalues is a complex number, Varkon dose not support complex numbers. |
Suppose the real non-symmetric matrix has order "3" like:
| Xx | Xy | Xz |
| Yx | Yy | Yz |
| Zx | Zy | Zz |
the length of the input matrix m is 3*3 = 9, the input matrix is:
| m(1) | = | Xx |
| m(2) | = | Yx |
| m(3) | = | Zx |
| m(4) | = | Xy |
| m(5) | = | Yy |
| m(6) | = | Zy |
| m(7) | = | Xz |
| m(8) | = | Yz |
| m(9) | = | Zz |
The elements are entered column after column.
The real eigen values:
| eigval(1) | = | val_1 |
| eigval(2) | = | val_2 |
| eigval(1) | = | val_3 |
The real eigen vectors:
| eigen vector 1 | = | evec(1) |
| eigen vector 2 | = | evec(2) |
| eigen vector 3 | = | evec(3) |
Be aware that in the three cases of the return value not equal "0", when (status = > 0, -1 or -2) the returned eigenvalues and eigenvectors arrays not correct. The return value of the function should be equal to 0 (status = 0).
Varkon version 1.19E svn# 121M