matlab-經常使用函數(1)

rng('shuffle'):  dom

  • 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都會產生一個不一樣的數字序列。spa

  • 使用

  從rng('shuffle')的定義來看,其使用意義在於使得每一次調用該函數以後,均可以使rand,randi,randn避免產生與上一次一樣的隨機數序列。文檔

相關文章
相關標籤/搜索