The discrete uniform pdf is
The discrete uniform distribution is a simple distribution that puts equal weight on the integers from one toN.
As for all discrete distributions, the cdf is a step function. The plot shows the discrete uniform cdf forN= 10.
x = 0:10; y = unidcdf(x,10); figure; stairs(x,y) h = gca; h.XLim = [0 11];
Pick a random sample of 10 from a list of 553 items.
rngdefault;% for reproducibility数量= unidrnd (553, 10)
numbers =1×10451 501 71 506 350 54 155 303 530 534
unidcdf
|unidpdf
|unidinv
|unidstat
|unidrnd
|random