Generate random integers given probability distribution

The code generates the random integers for the probability distribution (probability mass function (PMF)) defined by the vector.
36 Downloads
Updated Thu, 18 Jul 2019 15:34:09 +0000

View License

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 Linux
Categories
Find more on Random Number Generation in Help Center and MATLAB Answers

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
Version Published Release Notes
1.0.0