MathGroup Archive 2008

[Date Index] [Thread Index] [Author Index]

Search the Archive

Shuffle problem

  • To: mathgroup at smc.vnet.net
  • Subject: [mg84982] Shuffle problem
  • From: Bob Hanlon <hanlonr at cox.net>
  • Date: Fri, 25 Jan 2008 05:01:01 -0500 (EST)
  • Reply-to: hanlonr at cox.net

RandomSample[{t, t, t, h, h, h}]

{t,h,h,t,h,t}


Bob Hanlon

---- angela <mpopyft at lycos.com> 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
> 



  • Prev by Date: Re: Converting Radians into Degrees into Mathematica 6.01
  • Next by Date: Reading txt files with Digital Image Processing Package
  • Previous by thread: Re: Using 'IF' function on 'Lists' in Mathematica 6.01
  • Next by thread: Reading txt files with Digital Image Processing Package