Question: MATLAB scripts Consider the following script: clear; d= roll_2_dice (10000,100); [freq, prop] = tabulate_2_dice(d) ; disp (freq); disp (prop); This generates the following variables: Where

MATLAB scriptsMATLAB scripts Consider the following script: clear; d= roll_2_dice (10000,100); [freq, prop]

Consider the following script: clear; d= roll_2_dice (10000,100); [freq, prop] = tabulate_2_dice(d) ; disp (freq); disp (prop); This generates the following variables: Where - d is the simulated dice rolls in a row vector. - freq is a 112 array that contains the frequency of each combination. For example, freq(1) should always be zero, as the minimum combination of rolls is 2 [1+1). You would expect freq(7) to be the highest ( 1/6 of all outcomes). - prop is a 112 array that contains the proportions of each outcome. For example, the outcome of the number seven is shown below. freq(7) ans =1655 prop(7) ans =0.1655 Your task is to implement the functions roll_2_dice and tabulate_2_dice. These are summarised below

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!