数组的非互斥概率选取。
Show older comments
刚开始用matlab,求解答。。数组P中的数值的大小即为概率值,例如P=[0.1,0.5,0.4],从P中进行一次随机选取,选取按概率,但选出的数不一定为一个,比如例子中三个数都被选取的概率便是0.1*0.5*0.4,这种非互斥的概率选取如何编代码呢,数据量不算少。
Accepted Answer
More Answers (0)
Categories
Find more on 描述性统计量和可视化 in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!