Faster binornd using notmal approximation for large values
This function takes the same input as the matlab built-in function binornd, and returns statistically (almost) identical output, potentially in much shorter time. For n,p values for which np,n(1-p)>5 a much fasternormal approximation is used with mean=np,var=np(1-p). For the rest, the regular binornd function is used.
This function can be faster by a factor of 5-10 than binornd for large numbers, but can be used the same way.
Cite As
Itai Rusinek (2026). Faster binornd using notmal approximation for large values (https://www.mathworks.com/matlabcentral/fileexchange/45218-faster-binornd-using-notmal-approximation-for-large-values), MATLAB Central File Exchange. Retrieved .
MATLAB Release Compatibility
Platform Compatibility
Windows macOS LinuxCategories
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 |
