Question: Using MATLAB Write a function diceRoll that takes in two numeric inputs. The first number is how many dice you are rolling, and the second
Using MATLAB
Write a function diceRoll that takes in two numeric inputs. The first number is how many dice you are rolling, and the second number is the size of the dice (4, 6, 8 and 10 sides, etc.). The function should return two parameters. The first returned parameter should be the total of all the rolls . The second returned parameter should be a vector of the value for each individual die rolled. Remember, rolling 5 6-sided dice is not the same as rolling one 6 sided die and multiplying by 5. The rand() function is useful.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
