Perhaps

array e. 6 15 10

is what you are really trying to do?

Henry Rich

On 6/12/2019 10:49 AM, 'Rob Hodgkinson' via Programming wrote:
JmageK, also try to experiment with the adverb / (“table”) when you supply the 
verb “=“ as its argument.

    12$i.5
0 1 2 3 4 0 1 2 3 4 0 1

    2 3 1 =/ 12$i.5
0 0 1 0 0 0 0 1 0 0 0 0
0 0 0 1 0 0 0 0 1 0 0 0
0 1 0 0 0 0 1 0 0 0 0 1

    +/“1 ] 2 3 1 =/ 12$i.5
2 2 3

    +/"1]6 15 10 =/ i.201
1 1 1

…/Rob


On 13 Jun 2019, at 12:40 am, 'Pascal Jasmin' via Programming 
<[email protected]> wrote:


6 15 10 +/@:="0 1 i.201

1 1 1

6 15 10 +/@:="0 _ i.201 1 1

    On Wednesday, June 12, 2019, 9:27:08 a.m. EDT, JmageK <[email protected]> 
wrote:

    (([: +/ =&6) , ([: +/ =&10) , ([: +/ =&15)) i.201 1 1

How can I generate the above code for abirary comparison to i.20(example input) 
without repeating myself? I get errors if I try any variations of the following
    f=: 3 : '([: +/ x=y)'
    2 f i.5| domain error

Thanks in advance.

JmageK
--
Securely sent with Tutanota
----------------------------------------------------------------------
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


---
This email has been checked for viruses by AVG.
https://www.avg.com

----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to