choosing from numbers whose sum is X
显示 更早的评论
hi all,
suppose i generate 1000 random numbers and want to pick five out of that 1000 so that the sum of the five numbers is 100. if there is no way so the sum equal to 100 then i will just re run it. it doesnt have to work always...thank you!!
采纳的回答
更多回答(1 个)
Sean de Wolski
2012-9-11
编辑:Sean de Wolski
2012-9-11
0 个投票
类别
在 帮助中心 和 File Exchange 中查找有关 Creating and Concatenating Matrices 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!