On 7/6/2010 4:31 PM, Kraus Philipp wrote:
Hi,
I try to calulate the covariance from some data.
http://www.boost.org/doc/libs/1_43_0/doc/html/accumulators/user_s_guide.html...
I don't understand the call "acc call". I would like to rebuild the cov command form Matlab for matrix data (http://www.mathworks.com/access/helpdesk/help/techdoc/ref/cov.html). If this is correct, when I give as the first argument of command data from the first line and second as the data of the first column to the first value to calculate the new matrix?
I try try compile the excample, but I get a compiler error on the "acc::tag::covariate1":
acc::accumulator_set
> > xx; xx(1., acc::tag::covariate1 = 2.); xx(1., acc::tag::covariate1 = 4.); xx(2., acc::tag::covariate1 = 3.); xx(6., acc::tag::covariate1 = 1.);
std::cout << acc::covariance(xx) << std::endl;
The error text: "expected primary-expression befor = token". Sorry, it's a little bit late, so I don't see my mistake
It's impossible to say from just the little code fragment you've
included here. Have you #include