randbin
Version 1.0.0.0 (2.1 KB) by
Antonio Trujillo-Ortiz
Random vector (0's & 1's) with a Binomial distribution.
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 LinuxCategories
- AI and Statistics > Statistics and Machine Learning Toolbox > Probability Distributions and Hypothesis Tests > Discrete Distributions > Negative Binomial Distribution >
Find more on Negative Binomial Distribution in Help Center and MATLAB Answers
Tags
Discover Live Editor
Create scripts with code, output, and formatted text in a single executable document.
| Version | Published | Release Notes | |
|---|---|---|---|
| 1.0.0.0 | It was added an appropriate format to cite this file. |
