[討論] rand interval

看板MATLAB作者 (羅羅亞)時間14年前 (2011/12/29 04:46), 編輯推噓0(000)
留言0則, 0人參與, 最新討論串1/1
我遇到一個有關於亂數的怪問題想請教 根據 help doc,rand 丟出來的亂數應該是 (0,1) 的開區間 也就是不應該出現 0 跟 1 的情況 但是我用 shr3cong Type 的 generator 卻丟出 0 的情況 我把 generator state 記錄下來 大家可否幫我試試看以下的 script rs = (RandStream('shr3cong','Seed',22222)); rs.State = 1.0e+009 * [ 0.504702365000000 3.663236142000000 ]'; RandStream.setDefaultStream(rs); rand 我在 7.12.0.635 (R2011a) 跟 7.8.0.347 (R2009a) 版本都跑出 0 這是怎麼回事呢@@?? -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 114.34.220.228
文章代碼(AID): #1E-u0VBB (MATLAB)