Returns thevalue of the smallest element in array.
min_subscript (optional) The subscript of the smallest element in array:
Dimension An integer (n 0) designating the dimension over which the minimum is taken.
TIP: If you need to find both the minimum and maximum array values, use the Max keyword to avoid having to scan the array twice using separate calls to MAX and MIN.
x = [22, 40, 9, 12] PRINT, MIN(x)
9
x = [3, 4, 5, 6, 7, 8, 9] minval = MIN(x, minindex, Max=maxval) PRINT, minval
3
PRINT, minindex
0
PRINT, maxval
9
a = [ [1,1,3,2], [3,4,1,3], [3,0,1,0], [0,1,2,0] ] & PM, a 1 3 3 0 1 4 0 1 3 1 1 2 2 3 0 0 PM, MIN( a, d=0 ) 1 1 0 0 PM, MIN( a, d=1 ) 0 0 1 0 a = INDGEN( 1, 2, 3, 4, 5 ) INFO, MIN( a, d=2 ) Expression INT = Array(1, 2, 1, 4, 5)