Path: news.mathworks.com!newsfeed-00.mathworks.com!newsfeed2.dallas1.level3.net!news.level3.com!postnews.google.com!news2.google.com!Xl.tags.giganews.com!border1.nntp.dca.giganews.com!nntp.giganews.com!local02.nntp.dca.giganews.com!nntp.forethought.net!news.forethought.net.POSTED!not-for-mail
NNTP-Posting-Date: Fri, 10 Oct 2008 11:23:12 -0500
Date: Fri, 10 Oct 2008 10:24:00 -0600
From: Dan Hensley <somewhere@over.there>
User-Agent: Thunderbird 2.0.0.17 (Windows/20080914)
MIME-Version: 1.0
Newsgroups: comp.soft-sys.matlab
Subject: Re: Reversing a row matrix
References: <gcnqe3$s7h$1@fred.mathworks.com>
In-Reply-To: <gcnqe3$s7h$1@fred.mathworks.com>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
Message-ID: <TOKdnYbo8qDtHHLVnZ2dnUVZ_gGdnZ2d@forethought.net>
Lines: 17
X-Usenet-Provider: http://www.giganews.com
X-Trace: sv3-5Vek1cyUqXG25c5R3eDSc3iCs1jMnqGOpEdikaC1fFz+MjJkM8H93VIoSp9hGykTDEw9OKgpx6cayDa!AZdPx8lz3Pfw9LiappTG+wVD3BbwCizDiy5HLzFwoZ3WFZtdEsZcIwnEBTtsdSx+7ndr2uQqFmPi!EUkTYPt2O8A9xNvZrDyfYUrX
X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers
X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly
X-Postfilter: 1.3.39
Xref: news.mathworks.com comp.soft-sys.matlab:494583


Emeka Obe wrote:
> Hi All,
> 
> I need to reverse a matrix as follows:
> If x=[1 3 8 20 100 121], 
> 
> how do I get a matrix 
> 
> y=[121 100 20 8 3 1]
> 
> An answer is needed, please.
> 
> Emeka

y=x(end:-1:1);

Dan