hallo,
When i am using borland c++ builder 6.0 and gsl 1.8 to run the
following matrices examples, i am getting the wrong message with
"EAccessviolation". But the code works well in VC++ 2008. Anyone know the
reason? Thank you.
#include <math.h>
#include <stdio.h>
#include <gsl/gsl_matrix.h>
#include <gsl/gsl_blas.h>
int
main (void)
{
size_t i,j;
gsl_matrix *m = gsl_matrix_alloc (10, 10);
for (i = 0; i < 10; i++)
for (j = 0; j < 10; j++)
gsl_matrix_set (m, i, j, sin (i) + cos (j));
for (j = 0; j < 10; j++)
{
gsl_vector_view column = gsl_matrix_column (m, j);
double d;
d = gsl_blas_dnrm2 (&column.vector);
printf ("matrix column %d, norm = %g\n", j, d);
}
gsl_matrix_free (m);
}
Regards
Yongxin Feng
--
Institut für Energiewandlung und-Speicherung
Ingenieurwissenschaften und Informatik
Universität Ulm
Albert-Einstein-Allee 47
89081 Ulm, Deutschland
Tel: +49(0)731 50-25539
E-mail: [EMAIL PROTECTED]
[EMAIL PROTECTED]
_______________________________________________
Help-gsl mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/help-gsl