choosing from numbers whose sum is X
Ältere Kommentare anzeigen
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!!
Akzeptierte Antwort
Weitere Antworten (1)
Sean de Wolski
am 11 Sep. 2012
Bearbeitet: Sean de Wolski
am 11 Sep. 2012
0 Stimmen
Kategorien
Mehr zu Creating and Concatenating Matrices finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!