Create a primary function that returns the number of trials


Please use MatLab to do the following questions:

Consider an experiment where you record the sum of two dice rolls.

(a) Create either a sub-function or an anonymous function that simulates the experiment.

(b) Create a sub-function that returns a vector of t = 10000 trials of the experiment.

(c) Create a primary function that returns the number of trials that give each of the distinct simulated sums of two dice rolls. (Count how many of the 10000 sums are 2, how many are 3,..., and how many are 12. )

Request for Solution File

Ask an Expert for Answer!!
MATLAB Programming: Create a primary function that returns the number of trials
Reference No:- TGS02894494

Expected delivery within 24 Hours