Given a vector t of ones and zeros"

t=. 1 1 0 0 1 1 1 0 1 0 1 1 1 1 1 0 0 0 1 0


How can I code a verb gp that will enumerate the sizes of each
zero-delimited group of ones in the vector t?

For example:


gp t

2 3 1 5 1


Skip Cave
Cave Consulting LLC
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to