MathGroup Archive 2006

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

Search the Archive

Re: mirror image of a square matrix


Try threading Reverse over the matrix:

    matR = Reverse/@mat


             Hope that helps!

                   C.O.


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?
> /ravi
>
>
>   


-- 
==========================================================
Curtis Osterhoudt
PGP Key ID: 0x088E6D7A
Please avoid sending me Word or PowerPoint attachments
See http://www.gnu.org/philosophy/no-word-attachments.html
==========================================================




  • Prev by Date: Re: General--Differential equation problem..
  • 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