• <noscript id="ecgc0"><kbd id="ecgc0"></kbd></noscript>
    <menu id="ecgc0"></menu>
  • <tt id="ecgc0"></tt>

    matlab的rng函數的用法

    看到很多人不理解matlab中rng函數的用法,在此介紹一下

    東西/原料

    • matlab2017a
    • 電腦
    • 電源

    方式/步調

    1. 1

      起首來看matlab的幫忙文檔,

      第一行Control random number generation(節制隨機數的生當作,不知道這么翻譯對不合錯誤,接著看)

      Syntax(句法的意思),介紹了幾種常用的挪用體例

    2. 2

      rng(seed) seeds the random number generator using the nonnegative integer seed so that rand, randi, and randn produce a predictable sequence of numbers.(rng(種子)種子利用非負整數種子種子,使rand、randi和randn發生一個可展望的數字序列。)

      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')種子基于當前時候生當作隨機數生當作器。是以,蘭德、randi和蘭德在每次挪用rng之后城市發生分歧的數字序列。)

      此處可以理解,因為電腦的隨機數并不是像擲骰子一樣和實際中一樣隨機,接著看

    3. 3

      這一段就不翻譯了,這里就可以看出電腦的隨機數是操縱了一些算法生當作的,這里列出了七種算法

    4. 4

      后面還有一部門也不翻譯了,本身看很輕易理解的

      END

    嘗試

    1. 1

      幫忙里有例子,我鄙人邊又本身嘗試了一下

    2. 2

      輸入兩次rand(2),成果紛歧樣

    3. 3

      輸入rand(2)前加上rng(10,'twister'),此次就一樣了,這里就應該理解的很清晰了

      END

    注重事項

    • 有不懂的可以問我
    • 發表于 2020-05-11 17:00
    • 閱讀 ( 3264 )
    • 分類:其他類型

    你可能感興趣的文章

    相關問題

    0 條評論

    請先 登錄 后評論
    admin
    admin

    0 篇文章

    作家榜 ?

    1. xiaonan123 189 文章
    2. 湯依妹兒 97 文章
    3. luogf229 46 文章
    4. jy02406749 45 文章
    5. 小凡 34 文章
    6. Daisy萌 32 文章
    7. 我的QQ3117863681 24 文章
    8. 華志健 23 文章

    聯系我們:uytrv@hotmail.com 問答工具
  • <noscript id="ecgc0"><kbd id="ecgc0"></kbd></noscript>
    <menu id="ecgc0"></menu>
  • <tt id="ecgc0"></tt>
    久久久久精品国产麻豆