MATLAB: Simulate a dice throw

dicedoubleprobabilityrandomrandom number generator

how do I simulate a die throw? Can a random number generator between 1 to 6 do the same job?

Best Answer

doc randi
E.g., for a single throw you could use randi(6)