Answered step by step
Verified Expert Solution
Link Copied!

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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

The Temple Of Django Database Performance

Authors: Andrew Brookins

1st Edition

1734303700, 978-1734303704

More Books

Students also viewed these Databases questions