Path: news.mathworks.com!not-for-mail
From: "Jan Simon" <matlab.THIS_YEAR@nMINUSsimon.de>
Newsgroups: comp.soft-sys.matlab
Subject: Re: manipulation
Date: Thu, 3 Jun 2010 21:06:19 +0000 (UTC)
Organization: Universit&#228;t Heidelberg
Lines: 34
Message-ID: <hu95gb$lfb$1@fred.mathworks.com>
References: <hu8qhb$pq1$1@fred.mathworks.com> <hu8u98$bst$1@fred.mathworks.com> <hu8v0o$2et$1@fred.mathworks.com> <hu91kq$qc$1@fred.mathworks.com> <hu92i7$37t$1@fred.mathworks.com>
Reply-To: "Jan Simon" <matlab.THIS_YEAR@nMINUSsimon.de>
NNTP-Posting-Host: webapp-05-blr.mathworks.com
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1275599179 21995 172.30.248.35 (3 Jun 2010 21:06:19 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Thu, 3 Jun 2010 21:06:19 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 869888
Xref: news.mathworks.com comp.soft-sys.matlab:641993

Dear Ravi!


> I want it something like this in matlab:
> X = [658 1072  96 103 ;760 1089 292 298]
> >>  X =
>                658    1072   96  103
>                760    1089   292 298

I'm getting more confused. 
If I define this in Matlab:
  X = [658 1072  96 103 ;760 1089 292 298]
I get immediately:
   X =
                658    1072   96  103
                760    1089   292 298
Do you want something else?

In the first post you asked for this:
> I have a matrix X
> X =
>         658 1072
>         96 103
>        760 1089
>         292 298
> I wish INSTEAD to output like this:
> X = 658 1072 96 103
>      760 1089 292 298

Do you want to reorder the elements?
Perhaps:
  reshape(permute(x', 2, 2, 2), [3, 1, 2]), 2, 4)

Jan