At Sun, 2 Sep 2007 14:07:39 -0300, Ralph Silva wrote: > just a quick question: How can I use those functions in Section 20 fo the > manual, Statistics, directly from a gsl_vector? I took a look at Help-GSL > Archives but I couldn't find anything related to it. > > For example, I am using a variable "xdt" ( gsl_vector *xdt ) and do some > computation. After some steps, I want to do something like > > ... > gsl_sort_vector(xdt); /* This works fine */ > n = 1000; > > /* This do not work obviously */ > mean = gsl_stats_mean(xdt,1,n);
mean = gsl_stats_mean (xdt->data, xdt->stride, xdt->size) The "Vectors And Matrices" chapter of the manual has details of the memory layout of the vector elements and the gsl_vector struct. -- Brian Gough Network Theory Ltd, Publishing Free Software Manuals --- http://www.network-theory.co.uk/ _______________________________________________ Help-gsl mailing list [email protected] http://lists.gnu.org/mailman/listinfo/help-gsl
