For Programmers: Free Programming Magazines  


Home > Archive > Fortran > July 2004 > Eigenvectors and eigenvalues of a general real matrix









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Eigenvectors and eigenvalues of a general real matrix
Ivan Di Piazza

2004-07-08, 4:03 pm

Hello everybody, I have downloaded and used the 'rg.f' routine with
dependencies from the eispack routines.
I have tried it on a real nonsymmetric matrix 2*2, and it gives wrong
eigenvalues and only one correct eigenvector.
Can someone suggest me some other rotine to find eigenvalues and
eigenvectors of a real nonsymmetric matrix? Or Do anybody know if
'rg.f' is really general?
I actually need the rotine for a huge problem!

The matrix was .8304 .3771
.0682 .7004

with correct eigenvalues 0.5020, 0.00139
The routine gave 0.9384, 0.5924


Thank you, Ivan Di Piazza
Alois Steindl

2004-07-08, 4:03 pm

Hello,
it will be quite hard to find a good eigenvalue routine, which
calculates those results, that you find correct.
Recheck your calculations.
Alois
Herman D. Knoble

2004-07-08, 4:03 pm

Ivan: First, make sure that your driver program is absolutely correct
in passing correct length, type, and valued arguments that correspond
to the eigenvalue program.

Second, The test program, which includes Eigenp (alias DMXDQV) at :
http://ftp.cac.psu.edu/pub/ger/fortran/hdk/eigtest.for
and the data at the same site:
http://ftp.cac.psu.edu/pub/ger/fortran/hdk/eigtest.dat

was used to certify the algorithm, EIGENP (alias DMXDQV). You
may wish to add your matrix to the .dat file above and then
run eigtest.for on that.

Good luck with it.
Skip Knoble

On 8 Jul 2004 05:04:11 -0700, ivandp@crs4.it (Ivan Di Piazza) wrote:

-|Hello everybody, I have downloaded and used the 'rg.f' routine with
-|dependencies from the eispack routines.
-|I have tried it on a real nonsymmetric matrix 2*2, and it gives wrong
-|eigenvalues and only one correct eigenvector.
-|Can someone suggest me some other rotine to find eigenvalues and
-|eigenvectors of a real nonsymmetric matrix? Or Do anybody know if
-|'rg.f' is really general?
-|I actually need the rotine for a huge problem!
-|
-|The matrix was .8304 .3771
-| .0682 .7004
-|
-|with correct eigenvalues 0.5020, 0.00139
-|The routine gave 0.9384, 0.5924
-|
-|
-|Thank you, Ivan Di Piazza


Herman D. (Skip) Knoble, Research Associate
(a computing professional for 38 years)
Email: SkipKnobleLESS at SPAMpsu dot edu
Web: http://www.personal.psu.edu/hdk
Penn State Information Technology Services
Academic Services and Emerging Technologies
Graduate Education and Research Services
Penn State University
214C Computer Building
University Park, PA 16802-21013
Phone:+1 814 865-0818 Fax:+1 814 863-7049
John Lansberry

2004-07-09, 8:57 am

"Ivan Di Piazza" <ivandp@crs4.it> wrote in message
news:f9db6eef.0407080404.734d5dfb@posting.google.com...
>
> The matrix was .8304 .3771
> .0682 .7004
>
> with correct eigenvalues 0.5020, 0.00139
> The routine gave 0.9384, 0.5924
>
>
> Thank you, Ivan Di Piazza


First, if you want to try alternative code, look at Lapack (www.netlib.org).

Second, for the matrix m =[0.8304 0.3771;0.0682 0.7004], Matlab returns
0.9384 and 0.5924 as the eigenvalues.

Third, for that matrix I calculate the characteristic equation to be s^2-1.
5308s+0.55589=0, which has roots 0.9384 and 0.5924.

I think EISPACK is correct.


Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com