This is a pretty good routine to find eigenvectors and eigenvalues of real symmetric matrices.
To call: eigen(n, x, l, vc) for the n by n input matrix x.
The caller provides the space for the answers which go into two arrays:
- l is an array of n doubles for the eigenvalues.
- vc is a 2D array of n2 doubles for the eigenvectors.
The main routine at the end is merely a sample invocation and test case.