Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2006
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*November
*December
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2006

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: mirror image of a square matrix

  • To: mathgroup at smc.vnet.net
  • Subject: [mg66345] Re: mirror image of a square matrix
  • From: Bill Rowe <readnewsciv at earthlink.net>
  • Date: Wed, 10 May 2006 06:33:53 -0400 (EDT)
  • Sender: owner-wri-mathgroup at wolfram.com

On 5/9/06 at 2:35 AM, rv15i at yahoo.se (ravi) wrote:

>Let me define the mirror image of a matrix as the operation of
>flipping the columns such that the last column becomes the first,
>the second last becomes the second and so on. I would like to know
>if this can be done simpler than as follows:

>mat=Table[Random[],{n},{n}]
>matR=Transpose[Reverse[Transpose[mat]]]
>Are there any built in functions for operations like these?

The Transpose operations are not needed simply Map Reverse to each row. That is:

In[3]:=
mat=Table[Random[],{4},{4}];
Transpose[Reverse[Transpose[mat]]]==Reverse/@mat

Out[4]=
True
--
To reply via email subtract one hundred and four


  • Prev by Date: Re: Problem calling function in DLL via NETLink: NET::netexcptn: A .NET exception occurred
  • Next by Date: Re: mirror image of a square matrix
  • Previous by thread: Re: mirror image of a square matrix
  • Next by thread: Re: mirror image of a square matrix