MATLAB: R = randi(10,100,1) but using non-uniform distribution

non uniform distributionrandom

How to create random number from a range non-uniformly distributed?
Thanks!

Best Answer

As Jan comments, there are literally an infinite number of possible distributions. (In particular, do you want integers or real numbers in that range?)
If you have the Statistics Toolbox, there are several random number generators available. You can type
>> doc random
to see a list of possibilities. Another command that might be handy is randsample(). You can specify a particular frequency distribution for the random numbers. See
>> doc randsample
for details.