Chapter 5: Problem 7
Dice Simulation. It is often useful to be able to simulate the throw of a fair die. Write a MATLAB function dice that simulates the throw of a fair die by returning some random integer between 1 and 6 every time that it is called. (Hint: Call randomo to generate a randem number. Divide the possible values out of random0 into six equal intervals, and return the number of the interval that a given random value falls into.)
Short Answer
Step by step solution
Key Concepts
These are the key concepts you need to understand to accurately answer the question.