[Top][All Lists]

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

[Bug-gsl] gsl_linalg_LU_invert

From: Guardincerri, Elena
Subject: [Bug-gsl] gsl_linalg_LU_invert
Date: Fri, 20 Apr 2012 18:03:14 +0000

I am using the gsl function gsl_linalg_LU_invert in the following piece of code:

gsl_matrix_complex Invert(gsl_matrix_complex* m){
        double  inv[]= {0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0}; 
        int s;
        gsl_matrix_complex_view minv = gsl_matrix_complex_view_array(inv, 3, 3);
        gsl_permutation * p = gsl_permutation_alloc(3);
        gsl_linalg_complex_LU_invert(m, p, &minv.matrix);
        return minv.matrix;


Whenever I try to run this I get the following error when 
gsl_linalg_complex_LU_invert is called:

gsl: rowcol_source.c:51: ERROR: column index is out of range
Default GSL error handler invoked.

my m matrix is defined as:
double  ma[]= {1.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 1.0}; 
gsl_matrix_complex_view m = gsl_matrix_complex_view_array(ma, 3, 3);

and the call to my function is:
gsl_matrix_complex Invert(&m.matrix);

Thank you for your help,

Elena Guardincerri

reply via email to

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