MINVAL — Minimum value of an array#
-
MINVAL(ARRAY, MASK)#
Determines the minimum value of the elements in an array value, or, if the
DIM
argument is supplied, determines the minimum value along each row of the array in theDIM
direction. IfMASK
is present, only the elements for whichMASK
is.TRUE.
are considered. If the array has zero size, or all of the elements ofMASK
are.FALSE.
, then the result isHUGE(ARRAY)
ifARRAY
is numeric, or a string ofCHAR(255)
characters ifARRAY
is of character type.- Parameters
ARRAY – Shall be an array of type
INTEGER
orREAL
.DIM – (Optional) Shall be a scalar of type
INTEGER
, with a value between one and the rank ofARRAY
, inclusive. It may not be an optional dummy argument.MASK – Shall be of type
LOGICAL
, and conformable withARRAY
.
- Returns
If
DIM
is absent, or ifARRAY
has a rank of one, the result is a scalar. IfDIM
is present, the result is an array with a rank one less than the rank ofARRAY
, and a size corresponding to the size ofARRAY
with theDIM
dimension removed. In all cases, the result is of the same type and kind asARRAY
.
- Standard:
Fortran 90 and later
- Class:
Transformational function
- Syntax:
RESULT = MINVAL(ARRAY, DIM [, MASK]) RESULT = MINVAL(ARRAY [, MASK])
- See also: