Re: [討論] 照自訂的機率函數產生隨機數值

看板MATLAB作者 (盡其在我)時間14年前 (2011/11/09 12:25), 編輯推噓0(000)
留言0則, 0人參與, 最新討論串4/4 (看更多)
※ 引述《Leon (Achilles)》之銘言: : ※ 引述《NanFish (厭倦)》之銘言: : : 爬文爬到了 randsrc的指令 : : 但它好像是用在給定離散的數值出現的機率 : : 若今天我有個自定機率函數 : : 想在0-10之間照我自訂的機率函數隨機產生數值(有小數點的) 該怎麼實現呢? : This is a famous question, and I think the probability : textbook should a section for it :) : http://en.wikipedia.org/wiki/Inverse_transform_sampling : Enjoy :) 我建議可以參考一本經典: Sheldon Ross 所著的Simulations. 裡面有對各種隨機變數的生成作了個廣泛的討論. - 若可推出probability distribution 之 closed form, the inverse transform method 可直接應用. - 若不易得到 closed form, 有許多其他 "smart" 的 algorithm 可採用. -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 140.109.73.107 ※ 編輯: bowin 來自: 140.109.73.107 (11/09 12:26)
文章代碼(AID): #1EkW36z2 (MATLAB)
討論串 (同標題文章)
文章代碼(AID): #1EkW36z2 (MATLAB)