Re: Quick Question

• To: mathgroup at smc.vnet.net
• Subject: [mg78139] Re: Quick Question
• From: psycho_dad <s.nesseris at gmail.com>
• Date: Sat, 23 Jun 2007 07:21:31 -0400 (EDT)
• References: <f5gajp\$gbg\$1@smc.vnet.net>

```Hi,
perhaps the simplest way is (I took it from the Further Examples for
Random):

In[1]:=
RandomRelist[x_List]:=Block[{n=x,p},Do[p=Random[Integer,
{1,i}];n[[{p,i}]]=n[[{
i,p}]],{i,Length[x]}];n]

In[2]:=
RandomRelist[Range[6]]

Out[2]=
{6,2,1,4,5,3}

Cheers,

rob cronin       :
> 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
> http://liveearth.msn.com?source=msntaglineliveearthhm

```

• Prev by Date: Re: Quick Question
• Next by Date: Re: save as pdf in version 6
• Previous by thread: Re: Quick Question
• Next by thread: Re: Quick Question