Path: news.mathworks.com!not-for-mail
From: <HIDDEN>
Newsgroups: comp.soft-sys.matlab
Subject: Re: sorting matrices
Date: Wed, 24 Dec 2008 03:27:04 +0000 (UTC)
Organization: The MathWorks, Inc.
Lines: 24
Message-ID: <gisa68$60j$1@fred.mathworks.com>
References: <giruhp$but$1@fred.mathworks.com>
Reply-To: <HIDDEN>
NNTP-Posting-Host: webapp-02-blr.mathworks.com
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1230089224 6163 172.30.248.37 (24 Dec 2008 03:27:04 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Wed, 24 Dec 2008 03:27:04 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 1187260
Xref: news.mathworks.com comp.soft-sys.matlab:508585

"Peter Schreiber" <schreiber.peter15@gmail.com> wrote in message <giruhp$but$1@fred.mathworks.com>...
> Hi,
> I have a matrix like:
> 
> A=[1 4 3 2;
>      3 0 2 9;
>      2 1 5 3;
>      1 2 3 4;
>      9 3 9 9;
> ...
> ]
> 
> and I would like to randomly flip rows. At least all rows have different entries.
> Is there any short way of accomplishing this?
> 
> Best Regards,
> Peter

  Peter, I am not certain of what you meant by the sentence, "At least all rows have different entries."  For a time I thought you meant that the rearrangement had to be such that no row would be left in its original position.  That is why I withdrew my original solution.  Such a requirement would make a very interesting problem out of it.

  However on rereading the sentence I am not sure that was your meaning.  Could you please elucidate this for us?  What do you mean by a different entry?  Do you mean that no two rows in the matrix are alike?  And if so, what has this to do with random "flipping"?

Roger  Stafford