#include <stdio.h>
#include <gsl/gsl_vector.h>
#pragma comment(lib, "libgsl_d.lib")
#pragma comment(lib, "libgslcblas_d.lib")
int
main (void)
{
int i;
gsl_vector * v = gsl_vector_alloc (3);
for (i = 0; i < 3; i++)
{
gsl_vector_set (v, i, 1.23 + i);
}
for (i = 0; i < 3; i++)
{
printf ("v_%d = %g\n", i, gsl_vector_get (v, i));
}
return 0;
}
GSL向量分配与赋值
最新推荐文章于 2023-07-30 08:35:58 发布