Generating 15 random values (array of 1x15 dim) whose sum equal to 1.
1 次查看(过去 30 天)
显示 更早的评论
How I can generate a random vector v = [v1, ..., v15] such that v1+...+v15 = 1. Please help me. :MSA
0 个评论
回答(1 个)
John D'Errico
2017-9-28
编辑:John D'Errico
2017-9-28
2. Use it.
Do NOT generate a set of random numbers, then just scale them to sum to 1.
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Random Number Generation 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!