Mathematica 9 is now available
Student Support Forum
-----
Student Support Forum: 'Loop+RandomChoice' topicStudent Support Forum > General > "Loop+RandomChoice"

< Previous Comment | Next Comment >Help | Reply To Comment | Reply To Topic
Author Comment/Response
Bill Simpson
11/29/12 3:32pm

Will something like this work for you?

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, rc2, rc3}=Table[RandomChoice[ha[[i]]->{1, 2, 3, 4, 5}, 10], {i, 1, 3}]

URL: ,

Subject (listing for 'Loop+RandomChoice')
Author Date Posted
Loop+RandomChoice anna 11/29/12 10:45am
Re: Loop+RandomChoice Bill Simpson 11/29/12 3:32pm
Re: Re: Loop+RandomChoice anna 11/30/12 03:31am
< Previous Comment | Next Comment >Help | Reply To Comment | Reply To Topic