I think you might be looking for something like this: (*:`%: ,. +:`^) 4 :'x`:6 y'"0(4) 16 8 2 54.5982
That's transposed from what you suggested for the result you wanted, but you could transpose either the gerund array or the result array if you really want the transposed form. Is that enough of a hint? Thanks, -- Raul On Sun, Apr 19, 2015 at 1:51 AM, Jon Hough <[email protected]> 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
