|
From: | tuc |
Subject: | Re: [Help-gsl] hi :-) \o/ I've some problem with eigensystem |
Date: | Thu, 22 Apr 2010 10:20:39 +0200 |
User-agent: | Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.9) Gecko/20100330 Shredder/3.0.4 |
hi
let A be a square matrix. then a eigenvector v to the eigenvalue a is defined to have the property:So the point of question is this: the results that i get have the right values but the signs wrong.
A*v=a*v.therefor for any real number x (nonzero, zero is never an eigenvector) x*v is also a eigenvector of A:
A*(x*v)=x*(A*v)=x*(a*v)=a*(x*v)and since (-1) is a real number, mathematically speaking both results are correct.
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
[Prev in Thread] | Current Thread | [Next in Thread] |