| Author |
Comment/Response |
anna
|
11/29/12 10:45am
Dear all,
I would like to know if there is a possibility to use a loop within the RandomChoice command?
for example:
ha is a nested table with 5 probabilities each period for in total 3 periods:
ha={{0.20,0.20,0.10,0.40,0.10},{0.05,0.35,0.15,0.30,0.15},{0.50,0.10,0.20,0.05,0.15}}
rc1=RandomChoice[ha[[1]] -> {1, 2, 3, 4, 5} , 10]
rc1 gives me 10 random choices for period 1.
Is there a possibility to get the the random choices for all three periods? Something like a loop for ha[[i]],{i,1,3}?
Thank you in advance for your help.
anna
URL: , |
|