> From: Brian Schott > > I get these results from amend, but ... > > (2 1$70 90) (2 1 $0 1;1 2) }"1 2 i. 2 3 > 0 70 2 > 3 4 70 > > 0 90 2 > 3 4 90 > > I want the results below. How can I get the results > I desire changing only the shapes on the left of } or the > rank of } ? I can even use a solution that reshapes the > right hand argument using the shapes of the other arrays or > one that translates the right hand argument. > > 0 70 2 > 3 4 5 > > 0 1 2 > 3 4 90
I don't think you can get what you want by only changing x & m. The major stumbling block is that the whole of m will apply to every application of x to y. I think you want to end up with something like the following: (70 90) (0 0 1;1 1 2)} (2#,: i.2 3) 0 70 2 3 4 5 0 1 2 3 4 90 Starting with x=: 70 90 y=: i.2 3 x [`((0 0 1;1 1 2)"_)`(#...@[ # ,:@])} y 0 70 2 3 4 5 0 1 2 3 4 90 Now you just need a verb that gives you the indicies... ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm
