MathGroup Archive 2004

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

Search the Archive

Counting Runs

  • To: mathgroup at
  • Subject: [mg51890] Counting Runs
  • From: Gregory Lypny <gregory.lypny at>
  • Date: Thu, 4 Nov 2004 01:50:22 -0500 (EST)
  • Sender: owner-wri-mathgroup at

Looking for an elegant way to count runs to numbers in a series.  
Suppose I have a list of ones and negative ones such as
I'd like to create a function that counts the number of runs of 1s and 
-1s, which in this case is 3 and 2.


  • Prev by Date: Re: Help with a calculation
  • Next by Date: Re: LogListPlot
  • Previous by thread: Re: Help with a calculation
  • Next by thread: Re: Counting Runs