9.198. MINVAL

9.198 MINVAL — Minimum value of an array

Description:

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 the DIM direction. If MASK is present, only the elements for which MASK is .TRUE. are considered. If the array has zero size, or all of the elements of MASK are .FALSE., then the result is HUGE(ARRAY) if ARRAY is numeric, or a string of CHAR(255) characters if ARRAY is of character type.

Standard:

Fortran 95 and later

Class:

Transformational function

Syntax:
RESULT = MINVAL(ARRAY, DIM [, MASK])
RESULT = MINVAL(ARRAY [, MASK])
Arguments:
ARRAY Shall be an array of type INTEGER or REAL.
DIM (Optional) Shall be a scalar of type INTEGER, with a value between one and the rank of ARRAY, inclusive. It may not be an optional dummy argument.
MASK Shall be an array of type LOGICAL, and conformable with ARRAY.
Return value:

If DIM is absent, or if ARRAY has a rank of one, the result is a scalar. If DIM is present, the result is an array with a rank one less than the rank of ARRAY, and a size corresponding to the size of ARRAY with the DIM dimension removed. In all cases, the result is of the same type and kind as ARRAY.

See also:

MIN, MINLOC

© Free Software Foundation
Licensed under the GNU Free Documentation License, Version 1.3.
https://gcc.gnu.org/onlinedocs/gcc-7.1.0/gfortran/MINVAL.html

在线笔记
App下载
App下载

扫描二维码

下载编程狮App

公众号
微信公众号

编程狮公众号

意见反馈
返回顶部