[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Help-gsl] Matrix_Get Seg Fault
From: |
Zine Smith |
Subject: |
[Help-gsl] Matrix_Get Seg Fault |
Date: |
Wed, 8 Dec 2004 09:30:23 -0800 (PST) |
I'm new to GSL and have probably an RTFM question. In
attempting to perform a gsl_matrix_get I receive a seg
fault. The output from gdb is as follows:
Breakpoint 1, gsl_matrix_get (m=0x37, i=1108544768,
j=1073827872) at matrix_source.c:27
27 matrix_source.c: No such file or directory.
in matrix_source.c
(gdb) print m
$1 = (const gsl_matrix *) 0x37
(gdb) step
24 in matrix_source.c
(gdb) print m
$2 = (const gsl_matrix *) 0x37
(gdb) step
27 in matrix_source.c
(gdb) print m
$3 = (const gsl_matrix *) 0x0
The calling code is
gsl_matrix *egm96C;
gsl_matrix *egm96S;
void initMatrices (void)
{
initialized = 1;
egm96C = gsl_matrix_calloc (361,361);
egm96S = gsl_matrix_calloc (361,361);
gsl_matrix_set (egm96C,2,0,-0.000484165);
gsl_matrix_set (egm96C,2,1,-1.86988e-10);
etc.. through i=361, and j=361
}
{
<snip>
for (n=2;n<=nMax;n++)
{
for (m=0;m<=n;m++)
{
test1 = gsl_matrix_get (egm96C,n,m);
test2 = gsl_matrix_get (egm96S,n,m);
printf("%g\t",test1);
printf("%g\n",test2);
}
}
}
Any help? It appears that in the matrix_source.c my
matrix is getting washed out. What am I doing wrong?
Zine
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Help-gsl] Matrix_Get Seg Fault,
Zine Smith <=