On 11/5/07, David Vincent-Jones <[EMAIL PROTECTED]> wrote:
> I am trying to locate specific patterns of a prescribed length within data.
...
> dat=:0 7 8 8 8 9 2 2 5 5 5 3 8 8 8 0 0 5 5 9 6 8 8 8 8 4 0 6 4
>
> 2 5 pattern dat
> 17
> the result should ignore the earlier '5 5 5'
pattern=: (1 #~ [EMAIL PROTECTED]) [EMAIL PROTECTED]&(0 , 0 ,~ ]) ] e. {:@[
--
Raul
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm