Is a two-step process too ugly?

​   a​
=:6 7$ 0 0 0 0 0 0 1 2 3 4 5 6 7 8 9 1011
​ ​
12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 0 0 0 0 0
​   (a='_')}' ',:~a=: ":(a=0)}_,:~a​
                   1
 2  3  4  5  6  7  8
 9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31


On Thu, Sep 28, 2017 at 6:12 AM, Rudolf Sykora <[email protected]>
wrote:

> On 28 September 2017 at 01:09, Devon McCormick <[email protected]> wrote:
> > Assuming a is a numeric matrix:
> >
> >    a=. ":a
> >    (a='0')}a,:' '
> >                    1
> >  2  3  4  5  6  7  8
> >  9 1  11 12 13 14 15
> > 16 17 18 19 2  21 22
> > 23 24 25 26 27 28 29
> > 3  31
> >
> >
>
> see the missing zero in 10, 20, 30; isolated zeros
> were to be removed...
>
> Thanks anyway!
> Ruda
> ----------------------------------------------------------------------
> 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