MathGroup Archive 2010

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

Search the Archive

Re: Positions of earliest dates for each month in a list of dates

  • To: mathgroup at smc.vnet.net
  • Subject: [mg106467] Re: Positions of earliest dates for each month in a list of dates
  • From: Garapata <warsaw95826 at mypacks.net>
  • Date: Wed, 13 Jan 2010 06:00:31 -0500 (EST)
  • References: <higdki$kg9$1@smc.vnet.net> <hihgn2$fgo$1@smc.vnet.net>

I came up with this in the wee hours of the morning:

Flatten[Position[
  Prepend[(Most[myDates[[All, 2]]] - Rest[myDates[[All, 2]]]) /.
    x_ /; x != 0 -> 1, 0], 1]]

Seems to work, but not so elegant as any of the the offered solutions.

Thanks for all the great ideas.



  • Prev by Date: Plotting a curve on a flat torus
  • Next by Date: disable canceling
  • Previous by thread: Re: Positions of earliest dates for each month in a list of dates
  • Next by thread: Inconsistency in different ways of calculating CDF of bivariate