CoinFlip
>Psychtoolbox>PsychProbability
x = CoinFlip(ndraws,p)
Generate a list x of zeros and ones according to coin flipping (i.e.
Bernoulli) statistics with probability p of getting a 1.
Path Retrieve current version from GitHub | View changelog
Psychtoolbox/PsychProbability/CoinFlip.m