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
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
Get step-by-step solutions from verified subject matter experts
