your matrix is asymmetric but you are using function for symmetric
matrices.



On Mon, Jun 25, 2012 at 6:26 AM, Ilya Potapov <[email protected]> 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