matlab-常用函数(1)

rng('shuffle'):  

  • matlab help文档中的解释

  rng('shuffle'): seeds the random number generator based on the current time. Thus,rand,randi and randn produce a different sequence of numbers after each time you call rng().

  • 中文解释

  rng('shuffle'):基于当前次数的随机数产生器,每次调用rng()之后,rand,randi,randn都会产生一个不同的数字序列。

  • 使用

  从rng('shuffle')的定义来看,其使用意义在于使得每一次调用该函数之后,都可以使rand,randi,randn避免产生与上一次同样的随机数序列。

  

原文地址:https://www.cnblogs.com/Mr-Tiger/p/6813401.html