Gentlemen! I have to reproduce MATLAB random normal generator (randn) with some fixed seed.
Also, I have to reproduce it in an external script, without MATLAB itself. Has anyone done this? What random normal generator implementation is better to use?
P.S. Preferred languages are Python and C/C++, but other languages may be useful too.
rng
. Using it, you can configure Matlab to use the Mersenne Twister, which has implementations in many languages. However, the MT generates a uniform distribution; I don't know the details of how Matlab converts it to normal. $\endgroup$randn()
precisely? to do the very same thing MATLAB does with the very same seed values? $\endgroup$