[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Help-gsl] I met a problem with compling matrix example in borland c++ b
From: |
冯勇鑫 |
Subject: |
[Help-gsl] I met a problem with compling matrix example in borland c++ builder 6.0 |
Date: |
Wed, 3 Dec 2008 18:32:09 +0100 |
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: address@hidden
address@hidden
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Help-gsl] I met a problem with compling matrix example in borland c++ builder 6.0,
冯勇鑫 <=