Question: Using MATLAB script, please answer the following question with ALL work Write a function of dieRoll that takes a single argument, an integer (>0) number

Using MATLAB script, please answer the following question with ALL work  Using MATLAB script, please answer the following question with ALL work

Write a function of dieRoll that takes a single argument, an integer (>0) number of times to roll a die. The function uses randi to randomly generate integers representing that many rolls off a 6-sided die. The function should then calculate the average of all the rolls, and calculate the absolute value of the difference between that average and the expected average of 3.5. The function returns the absolute value of the difference (also called the random trial error) Create a test table and write a function to solve the problem. Design will be done in lecture or lab

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!