|Description:||Returns the minimum value of all elements in an array, a set of elements in an array, or elements in a specified dimension of an array.|
|Class:||Transformational function; Generic|
|Arguments:||ARRAY||Must be an array of type integer or real.|
|DIM (opt)||Must be a scalar integer with a value in the range 1 to n, where n is the rank of ARRAY.|
|MASK (opt)||Must be a logical array that is conformable with ARRAY.|
|Results:||The result is an array or a scalar of the
same data type as ARRAY.
The result is a scalar if DIM is omitted or ARRAY has rank one.
The following rules apply if DIM is omitted:
The value of MINVAL ((/2, 3, 4/)) is 2 because that is the minimum value in the rank-one array.
The value of MINVAL (B, MASK=B .GT. 0.0) finds the minimum value of the positive elements of B.
C is the array
MINVAL (C, DIM=1) has the value (2, 3, 4). 2 is the minimum value in column 1; 3 is the minimum value in column 2; and so forth.
[ 2 3 4 ] [ 5 6 7 ].
MINVAL (C, DIM=2) has the value (2, 5). 2 is the minimum value in row 1 and 5 is the minimum value in row 2.