zipf_rand(N, expn, M)

Version 1.0.0.0 (549 Bytes) by Tuyen Tran
Generate random numbers based on Zipf distribution
562 Downloads
Updated 17 Oct 2015

View License

Generate random numbers based on Zipf distribution
Author: Tuyen Tran (tuyen.tran@rutgers.edu). Oct 2015
Reference: https://en.wikipedia.org/wiki/Zipf's_law

N Number of Elements
expn Exponent
M Number of sample to be generated (in range [1,N])

Example: zipf_rand(3,1,4)
ans = 3 2 1 1

Cite As

Tuyen Tran (2024). zipf_rand(N, expn, M) (https://www.mathworks.com/matlabcentral/fileexchange/53568-zipf_rand-n-expn-m), MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R2015b
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.0