MathGroup Archive 2008

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

Search the Archive

Re: setting elements of an array based on a condition


On Apr 2, 1:03 am, Claus <clausena... at gmail.com> wrote:
> [...]
> 2) Then I want to calculate the sum of the elements in each column of W.
> How can I do this?
> [...]

In[1]:= W = Table[Random[Integer],{4},{5}]
        Total@W

Out[1]= {{0,1,1,1,1},
         {1,0,1,0,1},
         {0,0,1,0,0},
         {1,0,1,1,1}}

Out[2]=  {2,1,4,2,3}


  • Prev by Date: running a program
  • Next by Date: Re: How to put text on a curved surface?
  • Previous by thread: Re: setting elements of an array based on a condition
  • Next by thread: Re: setting elements of an array based on a condition