From: Hasan Yousuf on
Hi!

I want to change rows of matrix randomly. How can we do that?
a = [4 5 6 8; 9 3 2 4; 5 9 9 3; 4 9 4 7]

a =
4 5 6 8
9 3 2 4
5 9 9 3
4 9 4 7

I want to shuffle row 2, 3 and 4 randomly. Kindly help me.
From: Bruno Luong on
"Hasan Yousuf" <cancer216(a)hotmail.com> wrote in message <hrm2th$5bt$1(a)fred.mathworks.com>...
> Hi!
>
> I want to change rows of matrix randomly. How can we do that?
> a = [4 5 6 8; 9 3 2 4; 5 9 9 3; 4 9 4 7]
>
> a =
> 4 5 6 8
> 9 3 2 4
> 5 9 9 3
> 4 9 4 7
>
> I want to shuffle row 2, 3 and 4 randomly. Kindly help me.

help RANDPERM

Bruno
From: James Tursa on
"Hasan Yousuf" <cancer216(a)hotmail.com> wrote in message <hrm2th$5bt$1(a)fred.mathworks.com>...
> Hi!
>
> I want to change rows of matrix randomly. How can we do that?
> a = [4 5 6 8; 9 3 2 4; 5 9 9 3; 4 9 4 7]
>
> a =
> 4 5 6 8
> 9 3 2 4
> 5 9 9 3
> 4 9 4 7
>
> I want to shuffle row 2, 3 and 4 randomly. Kindly help me.

You can also try this FEX submission by Jan Simon:

http://www.mathworks.com/matlabcentral/fileexchange/27076-shuffle

James Tursa