[Jprogramming] Separating digits
R.E. Boss
r.e.boss at outlook.com
Sun Feb 25 22:03:58 UTC 2018
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:programming-bounces at forums.jsoftware.com]
> On Behalf Of Raul Miller
> Sent: zondag 25 februari 2018 20:45
> To: Programming forum <programming at jsoftware.com>
> 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 <skip at caveconsulting.com>
> 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
More information about the Programming
mailing list