How to set the same initial seed random numbers in Matlab?

后端 未结 1 1145
迷失自我
迷失自我 2021-01-23 02:50

I have a matlab code which has a bunch of random numbers such as: unifrnd(0,1), normrnd(mu,sigma), this sort of functions get repeated over and over ag

相关标签:
1条回答
  • 2021-01-23 03:06

    According to the documentation,

    rng(seed);
    

    sets the seed of the random number generator.

    0 讨论(0)
提交回复
热议问题