Mathematica 9 is now available

SeedRandom

Usage

SeedRandom[n] 使用整数n作为种子重新设置伪随机数发生器.
SeedRandom[ ] 使用时间作为种子重新设置发生器.


Notes

• 你可以使用SeedRandom[n]来保证在不同场合得到同一个伪随机数序列.
• 你也可以使用SeedRandom["string"],但使用这种方法时不同计算机系统上种子的设定可能有差别。
• 参见 Mathematica 全书: 3.2.3节.
• 同时参见: Random, $RandomState.
Further Examples

This seeds the random number generator.

In[1]:=  

Here is a list of 4 random numbers between 0 and 1.

In[2]:=  

Out[2]=

In[3]:=  

After reseeding the random number generator, you get the same sequence of random numbers.

In[4]:=  

Out[4]=



Any questions about topics on this page? Click here to get an individual response.Buy NowMore Information
THIS IS DOCUMENTATION FOR AN OBSOLETE PRODUCT.
SEE THE DOCUMENTATION CENTER FOR THE LATEST INFORMATION.