Re: [R] symmetric matrix on both diagonals

2012-04-21 Thread David Winsemius
On Apr 21, 2012, at 1:13 AM, Petr Savicky wrote: On Fri, Apr 20, 2012 at 10:52:47AM -0400, David Winsemius wrote: On Apr 20, 2012, at 7:05 AM, Petr Savicky wrote: On Fri, Apr 20, 2012 at 03:03:40AM -0700, juliane0212 wrote: I'm having some problems computing a matrix being symmetric on

Re: [R] symmetric matrix on both diagonals

2012-04-20 Thread Petr Savicky
On Fri, Apr 20, 2012 at 10:52:47AM -0400, David Winsemius wrote: > > On Apr 20, 2012, at 7:05 AM, Petr Savicky wrote: > > >On Fri, Apr 20, 2012 at 03:03:40AM -0700, juliane0212 wrote: > >> > >>I'm having some problems computing a matrix being symmetric on both > >>diagonals. > >> > >>Does anyone

Re: [R] symmetric matrix on both diagonals

2012-04-20 Thread David Winsemius
On Apr 20, 2012, at 7:05 AM, Petr Savicky wrote: On Fri, Apr 20, 2012 at 03:03:40AM -0700, juliane0212 wrote: I'm having some problems computing a matrix being symmetric on both diagonals. Does anyone know a way to get from this matrix M <- matrix(c(1,0,0,0,2,7,0,0,3,4,0,0,6,0,0,0), ncol=

Re: [R] symmetric matrix on both diagonals

2012-04-20 Thread juliane0212
That is exactly what I was looking for. Thank you -- View this message in context: http://r.789695.n4.nabble.com/symmetric-matrix-on-both-diagonals-tp4573418p4573594.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-project.o

Re: [R] symmetric matrix on both diagonals

2012-04-20 Thread Petr Savicky
On Fri, Apr 20, 2012 at 03:03:40AM -0700, juliane0212 wrote: > > I'm having some problems computing a matrix being symmetric on both > diagonals. > > Does anyone know a way to get from this matrix > > > M <- matrix(c(1,0,0,0,2,7,0,0,3,4,0,0,6,0,0,0), ncol=4) > > to this one >

[R] symmetric matrix on both diagonals

2012-04-20 Thread juliane0212
I'm having some problems computing a matrix being symmetric on both diagonals. Does anyone know a way to get from this matrix M <- matrix(c(1,0,0,0,2,7,0,0,3,4,0,0,6,0,0,0), ncol=4) to this one M_final <- matrix(c(1,2,3,6,2,7,4,3,3,4,7,2,6,3,2,1)