This is a simple and neat little problem (+1) and I enjoyed looking into it:) The function has two input arguments, the number of dice (NumDice) that will in each experiment and the total number (NumRolls) of times that the dice will be rolled. . How to plot a probability density function on a histogram?.
You can use the bar function to plot a bar graph when you already have the values of For NumDice = 2 the bins should range from 2 to 12. thanks! for NumRolls diceValues . How to plot a probability density function on a histogram? 2.
MATLAB probability demos. Table of Contents Cantor's devil's staircase as a cumulative distribution function. . 2,n))) % Roll a pair of dice.