MathGroup Archive 2004

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

Search the Archive

Re: Count

  • To: mathgroup at smc.vnet.net
  • Subject: [mg47338] Re: [mg47330] Count
  • From: Andrzej Kozlowski <akoz at mimuw.edu.pl>
  • Date: Tue, 6 Apr 2004 06:36:21 -0400 (EDT)
  • References: <200404050923.FAA21903@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

On 5 Apr 2004, at 18:23, paolo wrote:

> if i have a time serie, how can i Count the elements of this time 
> serie that are within a defined range
> Example:
>
> x={1,1.023,1.056,2.45,5.67,....}
>
> how can i Count the elements inside the range (1,3)?
>
> thanks
>
> Paolo
>
>
Here are a couple of a number of  possible ways:


Count[{1,1.023,1.056,2.45,5.67},_?(1²#²3&)]


4

or

Count[{1,1.023,1.056,2.45,5.67},_?(IntervalMemberQ[Interval[{1,3}],#]&)]

4





Andrzej Kozlowski
Chiba, Japan
http://www.mimuw.edu.pl/~akoz/


  • References:
    • Count
      • From: "paolo " <tarpanelli@libero.it>
  • Prev by Date: RE: Count
  • Next by Date: Assigning elements to a matrix
  • Previous by thread: Re: Count
  • Next by thread: Re: Count