NUS
Posts:
6
Registered:
3/28/12


generate random numbers based on probability of occurence
Posted:
Mar 28, 2012 12:35 PM


Hi Masters~
I am trying to solve a problem like this: my simulation need a wind from certain direction with certain speed (so, two numbers needed at one time). it must base on a probability of occurrence of the wind. There are 36 different directions, 10 degree each direction.
for direction from 0 to 260, for each 10 degree the Probability(8m/s) = 0.004 the Probability(12m/s) = 0.008 the Probability(17m/s) = 0.011 for direction of 270 and 360, the Probability(8m/s) = 0.004 the Probability(12m/s) = 0.010 the Probability(17m/s) = 0.014 for direction of 280 and 350, the Probability(8m/s) = 0.004 the Probability(12m/s) = 0.012 the Probability(17m/s) = 0.013 ...and for other directions too.
until now i have no idea how to generate this wind, both direction and speed...

