Re: Manipulating a matrix
- To: mathgroup at smc.vnet.net
- Subject: [mg59237] Re: Manipulating a matrix
- From: "Nasser Abbasi" <nma at 12000.org>
- Date: Wed, 3 Aug 2005 01:19:43 -0400 (EDT)
- References: <dcmuig$glg$1@smc.vnet.net>
- Sender: owner-wri-mathgroup at wolfram.com
"Ramier" <wissam2 at online.fr> wrote in message news:dcmuig$glg$1 at smc.vnet.net... > > > Hello everyone, > > 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. > > Thanks a lot, > > Wissam btw, It called a row, not a line. There are many ways to do this. This is one possible way. Let A be the matrix in question. type: A = {{1, 2, 3, 4}, {5, 6, 7, 8}, {9, 10, 11, 12}} {nRow, nCol} = Dimensions[A]; c = A[[ Range[2, nRow] , Range[2, nCol] ]] now c contains the part of the matrix you wanted. Nasser