看板 MATLAB 關於我們 聯絡資訊
請問如何造出每行或是每列總合為1的亂數矩陣(m x n),而且不能重複,例如: 每列總合為1的5x3矩陣 0.5 0.1 0.4 0.4 0.4 0.2 0.2 0.5 0.3 0.1 0.9 0 0.2 0.2 0.6 0.2 0.2 0.6<--不能重複 謝謝。 -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 114.34.98.46
jackdan:總合有限制為1的話 就不是亂數了吧? 01/22 23:57
jackdan:抱歉 現在才想到 Dirichlet或許會符合你的需求了 01/23 01:10
Raymond0710:先建立不重複的亂數 再normalize 01/23 13:22
gotowhere:我用help Dirichlet查詢了一下用法,但查不到..6.5版的 01/25 17:36
gotowhere:R大用法可行,謝謝 01/25 17:37