simulate a dice throw
10 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
Anmol Pardeshi
il 1 Set 2020
Modificato: John D'Errico
il 1 Set 2020
how do I simulate a die throw? Can a random number generator between 1 to 6 do the same job?
0 Commenti
Risposta accettata
James Tursa
il 1 Set 2020
Modificato: James Tursa
il 1 Set 2020
doc randi
E.g., for a single throw you could use randi(6)
2 Commenti
Più risposte (1)
John D'Errico
il 1 Set 2020
Modificato: John D'Errico
il 1 Set 2020
Why not? Remember that numbers are just symbols. It is how you choose to interpret those symbols that matters. If you want to associate a face of a die with the number 1, another face with the number 2, etc., why not? That is your choice.
A random integer generator such as randi generates equally probable numbers, if you want, from the set 1:6. And equiprobable is what a fair die would have as a property, right?
Mathematics is about symbols. It is too easy to get lost in the idea that mathematics is purely arithmetic.
0 Commenti
Vedere anche
Categorie
Scopri di più su Historical Contests 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!