Services & Resources / Wolfram Forums / MathGroup Archive
-----

MathGroup Archive 2009

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

Search the Archive

Summing all the elements along a dimension in a matrix

  • To: mathgroup at smc.vnet.net
  • Subject: [mg104288] Summing all the elements along a dimension in a matrix
  • From: CuppoJava <patrickli_2001 at hotmail.com>
  • Date: Sun, 25 Oct 2009 23:25:13 -0500 (EST)

Hi,
I just started using Mathematica after a year of experience with
Matlab, and I have a question regarding how to handle matrices.

What is the equivalent code for doing
sum(A,3) in mathematica?
This sums all the elements A along the third dimension.

I'm having a hard time finding it in the documentation.

Thanks a lot for your help
  -Patrick


  • Prev by Date: Re: comparable sizes across BubbleCharts
  • Next by Date: Calculating a given total using only given specific values tia sal22
  • Previous by thread: RE: How to make table of contents, back-of-the-book index in Mathematica?
  • Next by thread: Re: Summing all the elements along a dimension in a matrix