[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Help-gsl] hi :-) \o/ I've some problem with eigensystem

From: Patrick Alken
Subject: Re: [Help-gsl] hi :-) \o/ I've some problem with eigensystem
Date: Thu, 22 Apr 2010 09:09:23 -0600
User-agent: Mozilla/5.0 (X11; U; Linux i686 (x86_64); en-US; rv: Gecko/20100317 Thunderbird/3.0.4

If v is an eigenvector of a matrix M, then a*v is also an eigenvector, where a is any scalar. In your case, a = -1 to get agreement between your two results.

On 04/22/2010 12:34 AM, Giuseppe Marco Randazzo wrote:
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 =
eigenvalue = 1.28403
eigenvector =

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>>

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? :-)


zeld :-)

Help-gsl mailing list

reply via email to

[Prev in Thread] Current Thread [Next in Thread]