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