Eigenvalues of a General Matrix
This program computes the eigenvalues of a general matrix (either symmetrical or non-symmetrical).
Given AX= X,
we have the determinant: {A -lamda*1} as the characteristic polynomial. If the elements of matrix A are real, then the roots of the polynomial will be real and/or conjugate complex., The method presented here was developed by Rutishauser, and is quite good for systems up to N = 30 or 40 when used with computers accurate to 10-15 digits.
Program Notes:
The dimensions of the computer system are limited by the dimension statement at line 40. The system size may be altered as follows:
DIM A(N,N), L(N,N), U(N,N) , where N is the maximum size desired,
Example Compute the eigenvalues of the following general matrix:
Downloads;
Basic Program - liberty basic - lbegm.bas
Test Case (above example):
EIGENVALUES OF A GENERAL MATRIX
KEY IN ORDER OF MATRIX 3
INPUT ELEMENTS OF MATRIX A
A(1, 1) =?-1 A(1, 2) =?16 A(1, 3) =?-20
A(2, 1) =?1 A(2, 2) =?0 A(2, 3) =?0
A(3, 1) =?0 A(3, 2) =?1 A(3, 3) =?0
RUNNING NUMBER OF CYCLES COMPLETED = 47
ELEMENTS OF UPPER TRIANGULAR MATRIX
-5.0 2.04229607 1.95857988
|