Maybe "Learning J" section 14.3.1 might be useful.
On 19/04/2015 06:51, Jon Hough wrote:
My problem is slightly more complicated than the one I am giving in the
example,but in essence the problem is, given a 2x2 array of gerunds, and
anumber, how can I return a 2x2 array of the gerunds evaluated for the number.
e.g.
arr =: *:`%:
arr2 =: +:`^
mat =. arr ,. arr2
list =. 4 3
I can evaluate individual cells thusly
((0{0{mat)`: 6) 4
But would like a single expression that would yield the result, for example
(input = 4):
16 2
8 54.5982
I cannot seem to get an expression that works. To add slightly to the
complexity, my actual problem involves an
arbitrary nxn matrix.
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm