1. Home
  2. MINPOSITION

MINPOSITION

MINPOSITION(x) finds the position of the first instance of the minimum value within x. For a variate this is the number of the unit containing the minimum. For a matrix the row of the minimum value can then be calculated as:

row = INTEGER((MINPOSITION(x)-1)/NROWS(x)) + 1
and the column as
column = MINPOSITION(x) - NROWS(x)*(row-1)
For a symmetric matrix, the column is
column = INTEGER((SQRT(8*MINPOSITION(x)+1)+1)/2)
and the row is
row = MINPOSITION(x) - column*(column-1)/2

Updated on February 4, 2022

Was this article helpful?