Re: [R] Calculating the average after adding 3 matrices

2009-10-03 Thread Sarah Goslee
Well, yes: add them up and divide by 3. What did you try that didn't work? Sarah On Sat, Oct 3, 2009 at 12:06 PM, ANJAN PURKAYASTHA wrote: > Hi all, > Here is my problem: >  I have 3 matrices , A, B, C. > Each is an nXn matrix. > I need to create matrix D such that : D[i,j]= (A[i,j]+B[i,j]+C[i,

Re: [R] Calculating the average after adding 3 matrices

2009-10-03 Thread Ondrej Vozar
You can just do D<-(A+B+C)/3. Best regards, Ondrej. On 03/10/2009, ANJAN PURKAYASTHA wrote: > > Hi all, > Here is my problem: > I have 3 matrices , A, B, C. > Each is an nXn matrix. > I need to create matrix D such that : D[i,j]= (A[i,j]+B[i,j]+C[i,j])/3. > Being a newbie this is proving to be a

[R] Calculating the average after adding 3 matrices

2009-10-03 Thread ANJAN PURKAYASTHA
Hi all, Here is my problem: I have 3 matrices , A, B, C. Each is an nXn matrix. I need to create matrix D such that : D[i,j]= (A[i,j]+B[i,j]+C[i,j])/3. Being a newbie this is proving to be a challenge. Any ideas on how best to accomplish this? Thanks! Anjan -- = anja