MATLAB: Arbitrary Gamma random numbers

random number generator

Hi there,
I would like to generate a series of random numbers from gamma distribution. How could I set the lower and upper band of random numbers? e.g., I need some random numbers in the range of [100 500] from gamma distribution. Is there a way to prescribe it when we are using MATLAB toolbox like "randg" or "gamrand"?
I am looking forward to hearing from you… Best Regards, Erfan

Best Answer

If you have an upper bound on the numbers to be generated, then you are not working with a gamma distribution. By definition, gamma distributions are infinite distributions on the upper end. They are normally 0 on the lower bound, but one could add a constant to the distribution.
If you have upper and lower bounds, you could consider using a beta distribution.
Related Question