Path: news.mathworks.com!not-for-mail
From: "Pr B" <pb2297@columbia.edu>
Newsgroups: comp.soft-sys.matlab
Subject: randomize a matrix
Date: Wed, 22 Apr 2009 23:29:01 +0000 (UTC)
Organization: The MathWorks, Inc.
Lines: 10
Message-ID: <gso97t$csg$1@fred.mathworks.com>
Reply-To: "Pr B" <pb2297@columbia.edu>
NNTP-Posting-Host: webapp-05-blr.mathworks.com
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1240442941 13200 172.30.248.35 (22 Apr 2009 23:29:01 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Wed, 22 Apr 2009 23:29:01 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 1448256
Xref: news.mathworks.com comp.soft-sys.matlab:534824

hi all,

i need to randomize a matrix.  that is, i need to switch the position of the elements of a matrix randomly.  for example,

a =  [ 1 0 ; 3 4]
new a = [ 0 4 ; 1 3]

is there a command that would enable me to do this on a matrix of 5000x4 dimension?

thanks!