MathGroup Archive 2007

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

Search the Archive

Re: Quick Question

  • To: mathgroup at
  • Subject: [mg78131] Re: [mg78090] Quick Question
  • From: Carl Woll <carlw at>
  • Date: Sat, 23 Jun 2007 07:17:25 -0400 (EDT)
  • References: <>

rob cronin wrote:

>Quick Question:
>With Mathematica 5.2 is there any way to scramble a simple list of numbers:
>i.e. randomly rearange the list {1,2,3,4,5,6} without any apparent order.
>Kind regards
>Get a preview of Live Earth, the hottest event this summer - only on MSN 
You could look up RandomPermutation in DiscreteMath`Combinatorica`


Or, you could create your own permutation function:

randomperm[data_] := data[[ Ordering[ Table[Random[], {Length[data]}] ] ]]


Carl Woll
Wolfram Research

  • References:
  • Prev by Date: Re: Quick Question
  • Next by Date: Re: Quick Question
  • Previous by thread: Re: Quick Question
  • Next by thread: Re: Quick Question