Wow! Thanks Cliff. I don't understand it all yet, but it does exactly what
I need.
The capability to remove specific elements in a vector is something I have
needed
fairly often:

0-.~2 0 3 1 5 0 0 1

2 3 1 5 1


2 3-.~1 2 3 4 3 5 3 2 6 7 3 3 6

1 4 5 6 7 6


Where is this handy dyadic verb documented in the J doc?


Skip

Skip Cave
Cave Consulting LLC


On Mon, Mar 29, 2021 at 3:41 PM Clifford Reiter <[email protected]>
wrote:

>    0-.~#;._2 t,0
> 2 3 1 5 1
>
>
>
>
> On Mon, Mar 29, 2021 at 4:34 PM Skip Cave <[email protected]> wrote:
>
> > 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
> >
> ----------------------------------------------------------------------
> For information about J forums see http://www.jsoftware.com/forums.htm
>
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to