9.182 MAXLOC — Location of the maximum value within an array
- Description:
- Determines the location of the element in the array with the maximum value, or, if the DIM argument is supplied, determines the locations of the maximum element along each row of the array in the DIM direction. If MASK is present, only the elements for which MASK is
.TRUE.
are considered. If more than one element in the array has the maximum value, the location returned is that of the first such element in array element order. If the array has zero size, or all of the elements of MASK are .FALSE.
, then the result is an array of zeroes. Similarly, if DIM is supplied and all of the elements of MASK along a given row are zero, the result value for that row is zero.
- Standard:
- Fortran 95 and later
- Class:
- Transformational fun