MathGroup Archive 2012

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

Search the Archive

pattern matching


Consider the following code:

Count[Table[
  Count[Table[RandomInteger[], {n}], 1]/n, {n, 100, 1000, 10}], 
 x_ < .5]

I want to count the number of times there are occurrences less than .5 but some how I am not specifying the right pattern.  Any suggestions on getting right? 



  • Prev by Date: Locator + EventHandler
  • Next by Date: Problem in solving nonlinear Differential Equation
  • Previous by thread: Re: Locator + EventHandler
  • Next by thread: Re: pattern matching