Re: Shuffle problem
- To: mathgroup at smc.vnet.net
- Subject: [mg84979] Re: Shuffle problem
- From: Jens-Peer Kuska <kuska at informatik.uni-leipzig.de>
- Date: Mon, 21 Jan 2008 07:00:58 -0500 (EST)
- Organization: Uni Leipzig
- References: <fn1o0h$9n9$1@smc.vnet.net>
- Reply-to: kuska at informatik.uni-leipzig.de
Hi,
RandomSample[#, Length[#]] &[{t, t, t, h, h, h}]
??
Regards
Jens
angela wrote:
> Hi;
>
> Is there a way to get Mathematica 6.01 to randomly shuffle a list: Is there a built in command that I am blind to?
>
> For example:
>
> {t,t,t,h,h,h} would become something like {t,h,h,t,t,h}
>
> The lists are of arbitrary length. I wrote my own function but it is kind of slow.
>
> Thanks;
> Angela
>