Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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 scriptsimage text in transcribed

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

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

Database Design And Implementation

Authors: Edward Sciore

2nd Edition

3030338355, 978-3030338350

More Books

Students also viewed these Databases questions