Path: news.mathworks.com!not-for-mail
From: "burcu " <burcu102@hotmail.com>
Newsgroups: comp.soft-sys.matlab
Subject: how to create a new matrix from a [n 1] matrix
Date: Thu, 12 Nov 2009 17:07:03 +0000 (UTC)
Organization: The MathWorks, Inc.
Lines: 21
Message-ID: <hdhfbn$m36$1@fred.mathworks.com>
Reply-To: "burcu " <burcu102@hotmail.com>
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 1258045623 22630 172.30.248.37 (12 Nov 2009 17:07:03 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Thu, 12 Nov 2009 17:07:03 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 1870888
Xref: news.mathworks.com comp.soft-sys.matlab:584625


Hi all,

I have a nx1 matrix and i want to create an axb matrix from this lines by taking the first a columns and setting as column 1, taking next a columns and putting it right of the first a columns etc. 
An example to be more clear:

data= a
         b
         c
         d
         e
         f
         g
         h
i have 8x1 matrix and i need to get a 2x4 matrix from this like:
             a c e g
             b d f h
Any advice to create such a matrix for a really big number of n?

Thanks for all the replays!

Burcu