Generate random integers given probability distribution
Version 1.0.0 (1.25 KB) by
NAVNEET GARG
The code generates the random integers for the probability distribution (probability mass function (PMF)) defined by the vector.
pmfRND Ouputs random integers for given PMF
x = pmfRND(f,X) returns mxn matrix whose values are Zipf distributed,
where f > 0 is the PMF (discrete PDF) such that sum(f) = 1;
X = [m,n] is the size of desired ouput random matrix.
Cite As
NAVNEET GARG (2024). Generate random integers given probability distribution (https://www.mathworks.com/matlabcentral/fileexchange/72186-generate-random-integers-given-probability-distribution), MATLAB Central File Exchange. Retrieved .
MATLAB Release Compatibility
Created with
R2019a
Compatible with any release
Platform Compatibility
Windows macOS LinuxCategories
Find more on Random Number Generation in Help Center and MATLAB Answers
Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!Discover Live Editor
Create scripts with code, output, and formatted text in a single executable document.
Version | Published | Release Notes | |
---|---|---|---|
1.0.0 |