This is the mail archive of the gsl-discuss@sources.redhat.com mailing list for the GSL project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]