Consecutive runs in mathematica
From: Tony King (mathstutoring_at_ntlworld.com)
Date: 03/09/05
- Next message: Dana: "Re: Consecutive runs in mathematica"
- Previous message: John Creighton: "Re: EE Student, Edit, Proposal Masters, Help (concepts of functional programming, symbolic programming and MATLAB)"
- Next in thread: Dana: "Re: Consecutive runs in mathematica"
- Reply: Dana: "Re: Consecutive runs in mathematica"
- Messages sorted by: [ date ] [ thread ]
Date: Wed, 09 Mar 2005 11:42:05 GMT
I have a list which looks something like
{true,true,false,true,true,true,false,true.........}
that contains something like a million terms, and I would like some code to
return the maximum length of consecutive runs of trues and the maximum
length of consecutive runs of false.
Any ideas / assistance would be greatly appreciated.
Best wishes
Tony
- Next message: Dana: "Re: Consecutive runs in mathematica"
- Previous message: John Creighton: "Re: EE Student, Edit, Proposal Masters, Help (concepts of functional programming, symbolic programming and MATLAB)"
- Next in thread: Dana: "Re: Consecutive runs in mathematica"
- Reply: Dana: "Re: Consecutive runs in mathematica"
- Messages sorted by: [ date ] [ thread ]