[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Help-gsl] hi :-) \o/ I've some problem with eigensystem
From: |
Giuseppe Marco Randazzo |
Subject: |
[Help-gsl] hi :-) \o/ I've some problem with eigensystem |
Date: |
Thu, 22 Apr 2010 08:34:52 +0200 |
Hi all! :) first of all i must congratulate with all for this project. Now i
come to the point. I've read the documentation about the eigensystem and i've
understood (more or less) how it works. :) I took the example code for a
computation of eigenvalue end eigenvector for a matrix square of order 4, and
i've modify the data vector to two and i've changed more stuff signed with 4
to 2 because is a matrix of order two. So the point of question is this: the
results that i get have the right values but the signs wrong. Here i write my
example and the results that i've to get:
double data[] = { 0.616556, 0.615444,
0.615444, 0.716556};
The right results of eigen value and eigen vector:
eigenvalue= ( 0.04908339 )
( 1.28402771 )
eigenvectors = ( -0.735179 -0.677873 )
( 0.677873 -0.735179 )
The value which i took with the sample code instead are this:
eigenvalue = 0.0490843
eigenvector =
0.735179
-0.677873
eigenvalue = 1.28403
eigenvector =
0.677873
0.735179
So, the eigenvalue are ok, also the values of eigenvectors, but the signs are
not correct :|
The sample code which i've used come from here >>
http://www.gnu.org/software/gsl/manual/html_node/Eigenvalue-and-Eigenvector-
Examples.html
and is the first example of the page (15.8 Examples)
Now, i do not know where i' m wrong with the code, and if i've not understood
the right mode the gsl library, or simply if this could be a bug? :-)
Thanks.
zeld :-)
- [Help-gsl] hi :-) \o/ I've some problem with eigensystem,
Giuseppe Marco Randazzo <=