argmin =: $ #: (i. <./)@, This is a standard APL idiom.
Henry RIch On 12/26/2019 12:01 AM, Arnab Chakraborty wrote:
Dear all, I want to find the position (i,j) of the min entry in a n by n matrix. My current solution is ((=<./),mat )#"1 2,/(i.n),"0/i.n Is there a smarter method? ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm
---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm