Fortran90: Subroutine DSYEV and associating eigenvalues and eigenvectors.

  • Fortran
  • Thread starter Animastryfe
  • Start date
  • #1
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
 

Answers and Replies

  • #2
AlephZero
Science Advisor
Homework Helper
6,994
292
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.
 
  • #3
Thank you very much for the reply.

Just to be completely clear: the columns of the matrix A are the eigenvectors?
 
  • #4
AlephZero
Science Advisor
Homework Helper
6,994
292
If you set JOBV = "V", then yes. Otherwise, no!
 

Related Threads on Fortran90: Subroutine DSYEV and associating eigenvalues and eigenvectors.

Replies
0
Views
2K
Replies
6
Views
2K
Replies
5
Views
3K
Replies
4
Views
3K
  • Last Post
Replies
4
Views
5K
  • Last Post
Replies
5
Views
3K
  • Last Post
Replies
5
Views
4K
Top