MathGroup Archive 2006

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

Search the Archive

Re: Count Function

  • To: mathgroup at smc.vnet.net
  • Subject: [mg65527] Re: Count Function
  • From: Bill Rowe <readnewsciv at earthlink.net>
  • Date: Thu, 6 Apr 2006 06:52:31 -0400 (EDT)
  • Sender: owner-wri-mathgroup at wolfram.com

On 4/5/06 at 6:55 AM, gregory.lypny at videotron.ca (Gregory Lypny)
wrote:

>The syntax will be the death of me.

>Count[X[[All,14]], -9.] will tally how many elements in column 14 of
>matrix X are equal to -9, but I can't for the life of me figure out
>how to get how many are greater than -9.  Any hint would be most
>appreciated.

Well if you insist on using Count

Count[Sign[X[[All,14]]+9],1]

will do the trick. And if you don't insist on using Count there are any of a number of ways to do this such as

Length@Cases[X[[All,14]],_?(#>-9&)]
--
To reply via email subtract one hundred and four


  • Prev by Date: Re: Count Function
  • Next by Date: Re: Loop and Lost values - The Sequel
  • Previous by thread: Re: Count Function
  • Next by thread: Re: Count Function