I Needed to reduce each row with the least value of that row. ] m=: 4 4 $ ?.16#20 6 15 19 12 14 19 0 17 0 14 6 18 13 18 11 12
(-<./"1) m 0 9 13 6 14 19 0 17 0 14 6 18 2 7 0 1 Searching in J phrases I found that this one already exists (of course). But I needed the same for columns. I didn't found it in the J-house, but may be I overlooked it :-) First thing came up was using the same method after transposing m, and then transposing the result again. |:(-<./"1) |: m 6 1 19 0 14 5 0 5 0 0 6 6 13 4 11 0 But this looks much nicer: (-"1<./) m 6 1 19 0 14 5 0 5 0 0 6 6 13 4 11 0 ((|:@(-<./"1)@|:)-:(-"1<./))m 1 @@i ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm
