[Jprogramming] convert 0,1 coding to _1,1
Brian Schott
schott.brian at gmail.com
Tue Dec 11 15:09:03 UTC 2012
Mike,
Yes, I get your new results for ?. on the iPad. That's too bad, and worth remembering, for schott.brian at gmail.com. Thanks.
---
(B=)
On Dec 11, 2012, at 6:12 AM, Mike Day <mike_liz.day at tiscali.co.uk> wrote:
> On 11/12/2012 12:13 AM, Brian Schott wrote:
> Is there a better way than the verb `am` to do the following?
>
> am =:_1& (I.@:-.@]})
> am"1] 2 6 ?.@$ 2
> _1 _1 _1 _1 1 _1
> _1 _1 _1 1 1 _1
>
> ===============================================
> Here are three other simple ways- my "random" array appears to be different from yours(!?):
>
> ((_1 + +:) ; ({&_1 1) ; (_1&^@>:); am"1 )2 6 ?.@$ 2
> +----------------+----------------+----------------+----------------+
> |_1 1 1 _1 _1 1|_1 1 1 _1 _1 1|_1 1 1 _1 _1 1|_1 1 1 _1 _1 1|
> |_1 1 _1 _1 _1 _1|_1 1 _1 _1 _1 _1|_1 1 _1 _1 _1 _1|_1 1 _1 _1 _1 _1|
> +----------------+----------------+----------------+----------------+
>
>
> Mike
> ----------------------------------------------------------------------
> For information about J forums see http://www.jsoftware.com/forums.htm
More information about the Programming
mailing list