Path: news.mathworks.com!not-for-mail
From: "Emanuele " <emanuelemignosa.nospam@mathworks.com>
Newsgroups: comp.soft-sys.matlab
Subject: re-positioning a Matrix
Date: Thu, 22 May 2008 07:43:02 +0000 (UTC)
Organization: Bocconi
Lines: 27
Message-ID: <g13865$nl6$1@fred.mathworks.com>
Reply-To: "Emanuele " <emanuelemignosa.nospam@mathworks.com>
NNTP-Posting-Host: webapp-03-blr.mathworks.com
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1211442182 24230 172.30.248.38 (22 May 2008 07:43:02 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Thu, 22 May 2008 07:43:02 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 1017421
Xref: news.mathworks.com comp.soft-sys.matlab:469807



Hi all, during writing the code of an algorithms i have 
falled into a problem.

The result of math calculation is a matrix, of this type:

Matrix1 = [0   0   0   1    5  ]
          [0   0   0   0.1  0.2]
          [0   0   0   0.5  0.4]
          [0   0   0   0.3  0.1]

Where the first row is similar an index.  
I would re-positioning the matrix1 following the index of 
first row, in this way:

Matrix2 = [1   0   0   0    5  ]
          [0.1 0   0   0    0.2]
          [0.5 0   0   0    0.4]
          [0.3 0   0   0    0.1]

(Where the number of first row is the number of column)
There is a way to do it? I have no idea in this moment : - )

Thanks all in advace

Emanuele