Random Numbers with Probability Distribution in C

FrankDrebon's Avatar
Newbie Member
Hi all,

Does anyone have any experience with generating random numbers that distribute themselves according to a given probability distribution?

I am having trouble finding information on how to do this. I can find subroutines that output random numbers that conform to Gaussian distributions and other standard distributions but would like to generate random numbers based on the Maxwell Speed Distribution (proportional to x^2 exp(-x^2)).

Any advice would be appreciated.

Many thanks,

asadullah.ansari's Avatar, Join Date: Jan 2008
You can search on net this . You can get free siurce code also.