Uniform Distribution (Discrete)
Definition
The discrete uniform pdf is

Back to Top
Background
The discrete uniform distribution is a simple distribution that
puts equal weight on the integers from one to N.
Back to Top
Example
As for all discrete distributions, the cdf is a step function.
The plot shows the discrete uniform cdf for N = 10.
x = 0:10;
y = unidcdf(x,10);
stairs(x,y)
set(gca,'Xlim',[0 11])

Pick a random sample of 10 from a list of 553 items:
numbers = unidrnd(553,1,10)
numbers =
293 372 5 213 37 231 380 326 515 468
Back to Top
See Also
Discrete Distributions
Back to Top
 | Uniform Distribution (Continuous) | | Weibull Distribution |  |
Includes the most popular MATLAB recorded presentations with Q&A sessions led by MATLAB experts.
Get the Interactive Kit