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
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
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=
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
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
>
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)
Thank you Dan and Ted for these helpful comments. I will implement this
simple force symmetry code you suggested and make sure I familiarize with
this floating-point calculation problem so I can recognize such issues in
the future.
--
View this message in context:
http://r.789695.n4.nabble.com/sy
On 23-Oct-11 07:00:07, Daniel Nordlund wrote:
>> -Original Message-
>> From: r-help-boun...@r-project.org
>> [mailto:r-help-boun...@r-project.org]
>> On Behalf Of statfan
>> Sent: Saturday, October 22, 2011 10:45 PM
>> To: r-help@r-project.
> -Original Message-
> From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org]
> On Behalf Of statfan
> Sent: Saturday, October 22, 2011 10:45 PM
> To: r-help@r-project.org
> Subject: [R] symmetric matrix multiplication
>
> I have a symmetric
I have a symmetric matrix B (17x17), and a (17x17) square matrix A. If do
the following matrix multiplication I SHOULD get a symmetric matrix, however
i don't. The computation required is:
C = t(A)%*%B%*%A
here are some checks for symmetry
> (max(abs(B - t(B
[1] 0
> C = t(A)%*%B%*%A
> (max(
On Wed, Jan 20, 2010 at 8:18 AM, Douglas Bates wrote:
> On Tue, Jan 19, 2010 at 9:26 AM, Martin Maechler
> wrote:
>> Scanning for 'Matrix' in old R-help e-mail, I found
>>
>>> "GA" == Gad Abraham
>>> on Fri, 27 Nov 2009 13:45:00 +1100 writes:
>>
>> GA> Hi,
>> GA> I'd like to st
On Wed, Jan 20, 2010 at 2:26 AM, Martin Maechler
wrote:
> Scanning for 'Matrix' in old R-help e-mail, I found
>
>> "GA" == Gad Abraham
>> on Fri, 27 Nov 2009 13:45:00 +1100 writes:
>
> GA> Hi,
> GA> I'd like to store large covariance matrices using Matrix classes.
>
> GA> dsy
On Tue, Jan 19, 2010 at 9:26 AM, Martin Maechler
wrote:
> Scanning for 'Matrix' in old R-help e-mail, I found
>
>> "GA" == Gad Abraham
>> on Fri, 27 Nov 2009 13:45:00 +1100 writes:
>
> GA> Hi,
> GA> I'd like to store large covariance matrices using Matrix classes.
>
> GA> dsy
Scanning for 'Matrix' in old R-help e-mail, I found
> "GA" == Gad Abraham
> on Fri, 27 Nov 2009 13:45:00 +1100 writes:
GA> Hi,
GA> I'd like to store large covariance matrices using Matrix classes.
GA> dsyMatrix seems like the right one, but I want to specify just the
On Fri, Nov 27, 2009 at 2:22 PM, David Winsemius wrote:
>
> On Nov 26, 2009, at 9:45 PM, Gad Abraham wrote:
>
>> Hi,
>>
>> I'd like to store large covariance matrices using Matrix classes.
>>
>> dsyMatrix seems like the right one, but I want to specify just the
>> upper/lower triangle and diagonal
On Nov 26, 2009, at 11:00 PM, Gad Abraham wrote:
On Fri, Nov 27, 2009 at 2:22 PM, David Winsemius > wrote:
On Nov 26, 2009, at 9:45 PM, Gad Abraham wrote:
Hi,
I'd like to store large covariance matrices using Matrix classes.
dsyMatrix seems like the right one, but I want to specify just th
On Nov 26, 2009, at 9:45 PM, Gad Abraham wrote:
Hi,
I'd like to store large covariance matrices using Matrix classes.
dsyMatrix seems like the right one, but I want to specify just the
upper/lower triangle and diagonal and not have to instantiate a huge
n^2 vector just for the sake of having
Hi,
I'd like to store large covariance matrices using Matrix classes.
dsyMatrix seems like the right one, but I want to specify just the
upper/lower triangle and diagonal and not have to instantiate a huge
n^2 vector just for the sake of having half of it ignored:
Dumb example:
M <- new("dsyMatr
> "DR" == Dimitris Rizopoulos <[EMAIL PROTECTED]>
> on Sun, 21 Sep 2008 19:58:44 +0200 writes:
DR> try the following
DR> a <- matrix(rnorm(36), 6)
DR> ind <- lower.tri(a)
DR> a[ind] <- t(a)[ind]
DR> a
Yes, indeed, it needs the t(.) trick.
Note that 'Matrix' packag
Jorge Ivan Velez wrote:
Dear Megh,
Try this:
a = matrix(rnorm(36), 6)
a[upper.tri(a)]<-a[lower.tri(a)]
a
HTH,
If you look carefully, you'll see that it doesn't work! Dimitris had the
better idea.
--
O__ Peter Dalgaard Øster Farimagsgade 5, Entr.B
c/ /'_ --- Dept.
try the following
a <- matrix(rnorm(36), 6)
ind <- lower.tri(a)
a[ind] <- t(a)[ind]
a
I hope it helps.
Best,
Dimitris
Megh Dal wrote:
I have following matrix :
a = matrix(rnorm(36), 6)
Now I want to replace the lower-triangular elements with it's upper-triangular
elements. That is I want
Dear Megh,
Try this:
a = matrix(rnorm(36), 6)
a[upper.tri(a)]<-a[lower.tri(a)]
a
HTH,
Jorge
On Sun, Sep 21, 2008 at 1:47 PM, Megh Dal <[EMAIL PROTECTED]> wrote:
> I have following matrix :
>
> a = matrix(rnorm(36), 6)
>
> Now I want to replace the lower-triangular elements with it's
> upper
I have following matrix :
a = matrix(rnorm(36), 6)
Now I want to replace the lower-triangular elements with it's upper-triangular
elements. That is I want to make a symmetric matrix from a. I have tried with
lower.tri() and upper.tri() function, but got desired result. Can anyone please
tell m
23 matches
Mail list logo