From: Hatoddyam Toto on
Hi,
I have an array of 100 elements. I just want to redistribute the
elements of it and make a new array. How to make it?

Thanks for help,
-g
From: Ashish Uthama on
On Fri, 23 Apr 2010 18:10:29 -0300, Hatoddyam Toto
<bhattacharyya.samit(a)gmail.com> wrote:

> Hi,
> I have an array of 100 elements. I just want to redistribute the
> elements of it and make a new array. How to make it?
>
> Thanks for help,
> -g

How do you define 'redistribute' ?

I'll go with 'randomly redistribute without replacement'

>> d=1:5

d =

1 2 3 4 5

>> redistributed_d = d(randperm(length(d)))

redistributed_d =

3 5 1 2 4