At Sat, 5 Jul 2008 11:07:42 -0500,
Michael Chen wrote:
> I would like to know how you deal with this situation.  Please cc my
> email address as well, thanks!
> 
> double data[m][n];
>   FILE * in = fopen("kenneth48monthvalueweight.dat","r");
>   gsl_matrix_fscanf(in,&vdata.matrix);
>   gsl_matrix_view vdata = gsl_matrix_view_array (data[0],m,n);
>   for (i=0;i<n;i++){
>     gsl_vector_view column = gsl_matrix_column (&vdata.matrix, i);
>     mean[i]=gsl_stats_mean(column.vector.data,1,m);

A column vector has a non-unit stride so the appropriate usage is
mean[i]=gsl_stats_mean(column.vector.data,column.vector.stride,m);

-- 
Brian Gough

GNU Scientific Library -
http://www.gnu.org/software/gsl/


_______________________________________________
Help-gsl mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/help-gsl

Reply via email to