What is the default random number generation algorithm for 2018b Matlab? ( with randn(1,1) command)

Could somebody tell what is the default RNG algorithm for 2018b Matlab?
I generate with this code below ( not using RandStream, etc..):
randn(1,1)
Thanks!

 Accepted Answer

mt19937ar with a Ziggaurat transform is used for randn() these days.

3 Comments

Thanks Walter!
Could you please tell if I can confirm this information somewhere?
I also expected that uniform distribution is obtained via MT and then converted to normal via Ziggurat, but I could not find it in the documentation..
The rng page says that 'default' initializes twister. Then slightly further down in the description of generator keyword it lists twister and says the generator keyword is mt19937ar .
The RandStream documentation lists the available transforms for randn. And see https://blogs.mathworks.com/cleve/2015/05/18/the-ziggurat-random-normal-generator/
Thanks Walter 🙏🏻 I just thought that randn independently from randstream uses different generation Algol’s that’s why I asked.

Sign in to comment.

More Answers (0)

Categories

Find more on Random Number Generation in Help Center and File Exchange

Products

Release

R2018b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!