This is part of the HicEst documentation
MIN: Minimum Value of Scalar Arguments, or of an Array
The MIN function finds the minimum value of an array, while MINLOC finds its position.
⇾Home
⇾Contents
⇾more Programming
⇾ Examples
Bookmarks:
⇾minimum_value
MIN returns the
minimum_value
of the
scalar arguments or the array argument:
result = MIN( x, y, z, ...)
! x, y, z are numeric scalars, e.g.:
smallest = MIN( 4, -3.1,
EXP
(1) )
! sets smallest to -3.1
REAL
:: vec(5)
vec =
RAN
( 100, 10)
! e.g. 96.00351636 90.99435447 108.1637875 91.95317195 90.80626762
result = MIN(vec)
! set to 90.80626762
a character string:
MIN("Hello World")
! returns 32 ==
ICHAR
(" ")
MINLOC
is to find the
location of the minimum
, e.g.:
loc =
MINLOC
( vec )
! is set to 5
loc =
MINLOC
( "Hello World" )
! is set to 6
analogous functions are Max and MaxLOC
⇾
Support HicEst
⇾
Impressum
©2000-2019 Georg Petrich, HicEst Instant Prototype Computing. All rights reserved.