[Jprogramming] Groups

Skip Cave skip at caveconsulting.com
Mon Mar 29 20:34:10 UTC 2021


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


More information about the Programming mailing list