randbin

Random vector (0's & 1's) with a Binomial distribution.

You are now following this Submission

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 .

General Information

MATLAB Release Compatibility

  • Compatible with any release

Platform Compatibility

  • Windows
  • macOS
  • Linux
Version Published Release Notes Action
1.0.0.0

It was added an appropriate format to cite this file.