[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Help-gsl] newbie eigenvalues
From: |
Fabrizio Laurini |
Subject: |
[Help-gsl] newbie eigenvalues |
Date: |
Wed, 28 Jun 2006 19:41:59 +0200 |
User-agent: |
Thunderbird 1.5.0.4 (Windows/20060516) |
Dear all,
I've successfully installed gsl on my Fedora 5 system. I'm playing with
some examples on eigenvalues (using the example given in the manual) and
I found something quite strange when computing eigenvalues of a simple
squared matrix of order 2, whose values are taken from the array
double data[] = {1.511867, 0, 5.744244, 0};
Thus, the matrix has the second column with two zeros. I'm expecting to
see 1 eigenvalue equal to zero and the second equal to 1.511867, while,
after compiling and following the same structure of the example code, I got
$./a.out
eigenvalue = -5.03784
eigenvector =
-0.659366
0.751822
eigenvalue = 6.5497
eigenvector =
0.751822
0.659366
Notice that using the array of the example code
double data[] = { 1.0 , 1/2.0, 1/3.0, 1/4.0,
1/2.0, 1/3.0, 1/4.0, 1/5.0,
1/3.0, 1/4.0, 1/5.0, 1/6.0,
1/4.0, 1/5.0, 1/6.0, 1/7.0 };
I got exactly what is in the manual, i.e.
$ ./a.out
eigenvalue = 9.67023e-05
eigenvector =
-0.0291933
0.328712
-0.791411
0.514553
Am I missing something?
Thanks and regards,
Fabrizio
--
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.1.394 / Virus Database: 268.9.5/377 - Release Date: 27/06/2006
- [Help-gsl] newbie eigenvalues,
Fabrizio Laurini <=