randbin

Random vector (0's & 1's) with a Binomial distribution.
1.6K Downloads
Updated 24 Jun 2003

View License

The file generates a vector of 'n' random numbers (0's & 1's) with a
Binomial distribution. The parameter 'p' is the probability associated to get ones [P(x=1) = p].
For a 'x' fractional value the file automaticaly round it towards the
nearest integer. In case of get an inaccuracy among the 'p'-input and
the 'p'-output value (to test), it will be due that 'x' size results not
an integer.

Cite As

Antonio Trujillo-Ortiz (2026). randbin (https://in.mathworks.com/matlabcentral/fileexchange/3624-randbin), MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R11
Compatible with any release
Platform Compatibility
Windows macOS Linux
Version Published Release Notes
1.0.0.0

It was added an appropriate format to cite this file.