choosing from numbers whose sum is X
Mostra commenti meno recenti
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!!
Risposta accettata
Più risposte (1)
Sean de Wolski
il 11 Set 2012
Modificato: Sean de Wolski
il 11 Set 2012
0 voti
Categorie
Scopri di più su Creating and Concatenating Matrices in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!