MIN

The MIN function returns the value of the smallest element of Array . The type of the result is the same as that of Array .

Calling Sequence

Result = MIN( Array [, Min_Subscript] )

Arguments

Array

The array to be searched.

Min_Subscript

A named variable that, if supplied, is converted to a long integer containing the one-dimensional subscript of the minimum element. Otherwise, the system variable !C is set to the one-dimensional subscript of the minimum element.

Keywords

MAX

The name of a variable to receive the value of the maximum array element. If you need to find both the minimum and maximum array values, use this keyword to avoid scanning the array twice with separate calls to MAX and MIN.

NAN

Set this keyword to cause the routine to check for occurrences of the IEEE floating-point value NaN in the input data. Elements with the value NaN are treated as missing data. (See Special Floating-Point Values for more information on IEEE floating-point values.)

Example

Create a simple two-dimensional array by entering:

D = DIST(100)

Find the minimum value in array D and print the result by entering:

PRINT, MIN(D)

See Also

MAX