MathGroup Archive 2006

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

Search the Archive

Re: Count Function

  • To: mathgroup at
  • Subject: [mg65532] Re: [mg65501] Count Function
  • From: bsyehuda at
  • Date: Thu, 6 Apr 2006 06:52:46 -0400 (EDT)
  • References: <>
  • Sender: owner-wri-mathgroup at

The pattern matching capabilities of Mathematica will save your life many
time. You just need to know how to ask this salvage
you need a pattern represented by _
and you want that pattern to give true for some condition, so write an
intrinsic function that will return True if the value is greater than, say,
#>-9& is the function
Now, to make the pattern use that function you need to use ?
and as a command with Count

Note that the & sign should be enclosed within the parentheses


On 4/5/06, Gregory Lypny <gregory.lypny at> 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.
>         Greg

  • References:
  • Prev by Date: Re: current directory
  • Next by Date: Re: Count Function
  • Previous by thread: Re: Count Function
  • Next by thread: Re: Count Function