The present submission contains two Matlab functions that provide generation of outcomes from one of the two processes: Flipping (tossing) of one or more coin(s) or rolling (flipping) of one or more N-sided dice. The functions could be used for simulation or game purposes (e.g., Monte Carlo simulation or Backgammon game).
Two examples are given to clarify the usage of the functions. For convenience, the input and output arguments are given in the beginning of each function.
Hristo Zhivomirov (2020). Flip a Coin or Roll a Dice with Matlab (https://www.mathworks.com/matlabcentral/fileexchange/75288-flip-a-coin-or-roll-a-dice-with-matlab), MATLAB Central File Exchange. Retrieved .
Inspired by: Matrix Visualization with Matlab
Find the treasures in MATLAB Central and discover how the community can help you!Start Hunting!