MathGroup Archive 2005

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

Search the Archive

Re: Manipulating a matrix

  • To: mathgroup at smc.vnet.net
  • Subject: [mg59262] Re: Manipulating a matrix
  • From: Bill Rowe <readnewsciv at earthlink.net>
  • Date: Wed, 3 Aug 2005 01:20:03 -0400 (EDT)
  • Sender: owner-wri-mathgroup at wolfram.com

On 8/2/05 at 12:42 AM, wissam2 at online.fr (Ramier) wrote:

>I think that my question is rather simple and maybe I ought to go
>deeper into Mathematica book: I have a n x n matrix and I'd like to
>remove the first line and the first column in order to get the
>(n-1)x(n-1) matrix with the entries remaining. Is there a simple
>way to do that ?

>Perhaps my question is really simple or idiot but I've never used
>Mathematica before.

Without using any of the standard packages this can be done as

Rest/@Rest[mat]

where mat is the matrix you want to manipulate.

However, you may find it more convient to use the routines in LinearAlgebra`MatrixManipulation` which amoung other things include the function SubMatrix which would do what you want. Your particular problem could be done by

<<LinearAlgebra`
SubMatrix[mat, {2,2}, Dimensions@mat-{1,1}]
--
To reply via email subtract one hundred and four


  • Prev by Date: Re: Manipulating a matrix
  • Next by Date: Re: Manipulating a matrix
  • Previous by thread: Re: Manipulating a matrix
  • Next by thread: Re: Manipulating a matrix