Contents Previous Next Subchapters

Determining The Indices Of The Maximum Element
Syntax pmax(matrix)
See Also max , maxs , mins

Description
Returns a two-element integer row vector containing the row and column indices of the maximal element of matrix, where matrix is an integer, real or double-precision matrix.

Example
     pmax({[1, 2], [8, 3]})
returns
     [ 2 , 1 ]
because the maximal element of the matrix, 8, is in the second row and the first column of the matrix.