Random Number Generator
1 visualizzazione (ultimi 30 giorni)
Mostra commenti meno recenti
Hello All,
I have been charged with coming up with a way to raffle an iPad2 at a charity event. The raffle participants are all members of the non-profit with member id#'s. Instead of putting paper in a bowl I thought about using a random number generator to produce the winning member id. I thought that Mat-Lab would be a useful tool for doing this. Any thoughts??
0 Commenti
Risposta accettata
Paulo Silva
il 1 Set 2011
RandStream.setDefaultStream(RandStream('mt19937ar','seed',sum(100*clock)));
n=10; %number of ids
randi([1 n])
2 Commenti
Paulo Silva
il 1 Set 2011
That would do it but it's too much work and I can't think any other way besides getting another set of consecutive IDs for each participant.
Più risposte (1)
Vedere anche
Categorie
Scopri di più su Random Number Generation in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!