[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug-gsl] Eigenvalues
From: |
Ilya Potapov |
Subject: |
[Bug-gsl] Eigenvalues |
Date: |
Mon, 25 Jun 2012 16:26:43 +0300 |
User-agent: |
Mutt/1.5.20 (2009-12-10) |
Hi,
I am trying to find eigenvalues of the simple 2x2 matrix
-2 2
-10 7
It seems to me that the eigenvalues must be {2,3}.
When I implement GSL library code to compute this I have a weird result.
Please, find enclosed a minimalistic code for the problem.
I use gsl_eigen.h and gsl_matrix.h files.
I set up the matrix like
double jac[]={-2,2,-10,7};
gsl_matrix_view jacmat=gsl_matrix_view_array(jac,DIM,DIM);
where DIM=2 and jacmat.matrix contains the gsl_matrix object.
The output of the program is the reconstructed original matrix and the
eigenvalues. Here what I have:
Jacmat=
-2 2
-10 7
Eigen values: -8.46586 13.4659
It seems to me I am doing everything according to the examples in GSL
manuals. Please help.
P.S. I want to introduce this algorithm in bigger program with bigger
matrices I am just making it work on simpler ones.
Thanks you in advance.
with best regards,
Ilya Potapov.
bug.c
Description: Text document
- [Bug-gsl] Eigenvalues,
Ilya Potapov <=