Search All of the Math Forum:
Views expressed in these public forums are not endorsed by
NCTM or The Math Forum.



Probability Problem
Posted:
Aug 21, 2000 11:31 AM


Hi everyone,
I am trying to write a loop in MATLAB where each iteration will produce one of n numbers (eg. 1,2,3,...,n). The thing is, I would like these numbers being produced based on its probability, ie. x1 probability of producing 1, x2 probability of producing 2 and so on where x1+x2+...=1 and the probabilities are distinct.
Anyone could give me a hint of how to do this?
Thank you.
aris



