Fortran90: Subroutine DSYEV and associating eigenvalues and eigenvectors.

Join the discussion
Registration is free. Ask a follow-up in this thread, or start your own.
3 replies · 6K views
Animastryfe
Messages
80
Reaction score
0
Greetings. I am using the LAPACK (Linear Algebra Package) software package to find the eigenvalues and eigenvectors of a large symmetrical real matrix. Specifically, I calculate a scalar from each eigenvector, and I want to graph it against its associated eigenvalue.

I am using the subroutine DSYEV of LAPACK to do this. However, DSYEV outputs the eigenvalues in ascending order, and I'm not sure how it orders the eigenvectors. Is there a way to associate each eigenvector with its eigenvalue?

Edit: The official page for DSYEV is here: http://www.netlib.org/lapack/double/dsyev.f
Here is another page about it: http://www.nag.co.uk/numeric/fl/nagdoc_fl22/xhtml/F08/f08faf.xml
 
Physics news on Phys.org
The eigenvectors are returned in the A matrix in the same order as the eigenvalues.

A(1:N, 1) is the vector for W(1), A(1:N, 2) is the vector for W(2), etc.
 
Thank you very much for the reply.

Just to be completely clear: the columns of the matrix A are the eigenvectors?
 
If you set JOBV = "V", then yes. Otherwise, no!