F90 - diagnolize square matrix subroutine

Join the discussion
Ask a follow-up here, or get your own question answered by working scientists, mathematicians and engineers — people, not an autocomplete.
Real named experts · corrections over time · the nuance an AI answer skips
1 reply · 4K views
natski
Messages
262
Reaction score
2
Hi all,

Does anyone have/know the location of a subroutine for returning the diagonalized matrix of square, real array? The array is a covariance matrix so should be diagonalizable in all cases.

Thanks,

Natski
 
Physics news on Phys.org
This is a week old, so probably too late, but check out the lapack library for fortran. There should be several inversion routines. I don't do much/any fortran but here is a webpage that outlines some of the routines -- more than 1 should be able to do what you'd like.

http://physics.orst.edu/~rubin/nacphy/lapack/linear.html

Also if you want to write your own, you can check out examples from places like the numerical recipes web page. I think their book on fortran is open to all now.