How to generate correlated random number?

Dear Experts,
I want to generate random number with three variables with correlation taken into account.
I followed one example from here here and used the GaussianND function to generate

But somehow I am getting following error.
I have attached the code also.
multivarGaus.C (874 Bytes)

Could you please let me know a solution for this.

error: no member named ‘GaussianND’ in ‘ROOT::Math::GSLRandomEngine’

  • rnd.GaussianND(dim, pars, cov, genpars);*

Thanks and Regards

Please read tips for efficient and successful posting and posting code

ROOT Version: Not Provided
Platform: Not Provided
Compiler: Not Provided

You need at least ROOT 6.26.

Thanks for you reply.
Is there anyway I can set up for 6.26 without installing it ?


After doing this: source /cvmfs/

I am getting error like this after root -l:
root: /lib64/ version CXXABI_1.3.8' not found (required by root) root: /lib64/ version GLIBCXX_3.4.21’ not found (required by root)

On which machine are you working?

It’s working fine now.


This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.