bug-gsl
[Top][All Lists]
Advanced

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

Re: [Bug-gsl] Eigenvalues


From: Patrick Alken
Subject: Re: [Bug-gsl] Eigenvalues
Date: Mon, 25 Jun 2012 17:13:16 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:12.0) Gecko/20120430 Thunderbird/12.0.1

You are using a symmetric solver on a non-symmetric matrix. See the nonsymm* routines

On 06/25/2012 03:26 PM, Ilya Potapov wrote:
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.




reply via email to

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