MathGroup Archive 2003

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Adding elements of a matrix

  • To: mathgroup at smc.vnet.net
  • Subject: [mg40638] Re: [mg40583] Adding elements of a matrix
  • From: Dr Bob <majort at cox-internet.com>
  • Date: Fri, 11 Apr 2003 02:06:12 -0400 (EDT)
  • References: <200304100742.DAA24323@smc.vnet.net>
  • Reply-to: majort at cox-internet.com
  • Sender: owner-wri-mathgroup at wolfram.com

Is this what you mean?

m = {{a, b}, {c, d}};
Plus @@ Flatten@m

a + b + c + d

Bobby

On Thu, 10 Apr 2003 03:42:37 -0400 (EDT), Rebeca Choy <rchoy at ula.ve> wrote:

> Hi,
>
> How can I add in Mathematica every element of a matrix without adding 
> twice the mixed terms?
>
> for example i have a matrix m[[i,j]] and i want to add every term where 
> i<j (this is to avoiding adding twice the same number)
>
> Can I do it with Sum?
>
> Rebeca Choy
>
>
>



-- 
majort at cox-internet.com
Bobby R. Treat



  • Prev by Date: Re: music with Mathematica
  • Next by Date: Re: Adding elements of a matrix
  • Previous by thread: Adding elements of a matrix
  • Next by thread: Re: Adding elements of a matrix