10#.^:_1 &.> a
+---+-----+---+-------+---+-+
|1 0|3 4 5|6 4|5 6 4 2|1 1|5|
+---+-----+---+-------+---+-+


R.E. Boss


> -----Original Message-----
> From: Programming [mailto:[email protected]]
> On Behalf Of Raul Miller
> Sent: zondag 25 februari 2018 20:45
> To: Programming forum <[email protected]>
> Subject: Re: [Jprogramming] Separating digits
> 
>    a=. 10 345 64 5642 11 5
>    ,.&.":&.> a
> ┌───┬─────┬───┬───────┬───┬─┐
> │1 0│3 4 5│6 4│5 6 4 2│1 1│5│
> └───┴─────┴───┴───────┴───┴─┘
> 
> I hope this helps,
> 
> --
> Raul
> 
> 
> On Sun, Feb 25, 2018 at 2:17 PM, Skip Cave <[email protected]>
> wrote:
> > how can I take a vector of integers:
> >
> > a=. 10 345 64 5642 11 5
> >
> > and separate them into their individual digits (integers):
> >
> > sep  a
> >
> > ┌───┬─────┬───┬───────┬───┬─┐
> >
> > │1 0│3 4 5│6 4│5 6 4 2│1 1│5│
> >
> > └───┴─────┴───┴───────┴───┴─┘
> >
> > ?
> >
> > Skip
> > ----------------------------------------------------------------------
> > 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