Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

B 2 ) Using Matlab ( or Excel . . . but really you should use Matlab here ) create a script that simulates the

B2) Using Matlab (or Excel ... but really you should use Matlab here) create a script that
simulates the output of rolling two dice. That is, two dice are rolled and the value of
interest is the sum of these two rolls. Your script should simulate 1000 rolls of 2 dice.
Plot a his togram of the output for rolling 2 dice 1000 times
There are many ways to accomplish problem B2. I would create a 2-
dimensional array in which each row is a roll and each column is a die. So,
there would be 1000 rows and 2 columns. For each row-column combination
simulate a random die roll as in HW3_help.m file. Then sum across each row
to get the sum of the 2 dice.
Use the "his togram()" function to plot a his togram. You can either search for
this function in the Matlab help or simply type 'help his togram'to get help on
using this function.
image text in transcribed

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

Databases A Beginners Guide

Authors: Andy Oppel

1st Edition

007160846X, 978-0071608466

More Books

Students also viewed these Databases questions

Question

1. What physical and mental tasks does the worker accomplish?

Answered: 1 week ago

Question

Advance warning and an explanation for the layoff.

Answered: 1 week ago