Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started