choosing from numbers whose sum is X
Mostrar comentarios más antiguos
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!!
Respuesta aceptada
Más respuestas (1)
Sean de Wolski
el 11 de Sept. de 2012
Editada: Sean de Wolski
el 11 de Sept. de 2012
0 votos
Categorías
Más información sobre Creating and Concatenating Matrices en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!