This is the mail archive of the
gsl-discuss@sources.redhat.com
mailing list for the GSL project.
Computing the mean of a vector.
- From: Daniel T Konkle <daniel dot konkle at dynetics dot com>
- To: gsl-discuss at sources dot redhat dot com
- Date: Wed, 14 May 2003 15:18:51 -0500
- Subject: Computing the mean of a vector.
I'm looking through the Reference Manual & I'm trying to figure out if
there is a way to call the gsl_mean function but pass it a vector.
I can't figure out how to access the data in the function:
so for:
double gsl_stats_mean( const double data[], size_t stride, size_t n)
with
gsl_vector *v;
double m;
can I call it like this:
m = gsl_stats_mean( v->data, v->stride, v->size )
and is there an easier way?
Thanks in advance:
Danny