[R] symmetric matrix on both diagonals

juliane0212 stephanmi1 at web.de
Fri Apr 20 12:03:40 CEST 2012


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) ,
ncol=4)

thanks

--
View this message in context: http://r.789695.n4.nabble.com/symmetric-matrix-on-both-diagonals-tp4573418p4573418.html
Sent from the R help mailing list archive at Nabble.com.



More information about the R-help mailing list