Hi,
Why the first element of the vector is generated from the distribution with the mean value equal to 0.0. How should I correct this code:
void RNorm(int n ,float *x ,float mu=100.0f, float sigma=1.0f)
{
VSLStreamStatePtr stream;
vslNewStream( &stream, VSL_BRNG_MCG31, 777);
// vsRngGaussian( VSL_METHOD_SGAUSSIAN_BOXMULLER2, stream, 1, x, mu, sigma ); //if I use this line the result will be correct
vsRngGaussian( VSL_METHOD_SGAUSSIAN_BOXMULLER2, stream, n, x, mu, sigma );
vslDeleteStream( &stream );
}
Thanks,
Stan