In the attached document how would you write a command to generate two random numbers for two dice. Below is for one dice; so do you just change roll=randi statement, and put in 2,12 in place of 1,6?
rng('shuffle')numRolls=input('Please enter how many rolls you would like to simulate:')counts = zeros(1,6) for r = 1 : numRolls roll = randi([1 6],1) counts(roll) = counts(roll)+1end
counts = (counts / numRolls)*100
Best Answer