Array Max & Min Function

Returns the maximum and minimum values found in array, along with the indexes for each value.

The connector pane displays the default data types for this polymorphic function.


icon

Inputs/Outputs

  • c1ddbl.png array

    array can be an n-dimensional array of any type.

  • idbl.png max value

    max value is of the same data type and structure as the elements in array.

  • ii32.png max index(es)

    max index(es) is the index for the first max value.

    If array is multidimensional, max index(es) is an array whose elements are the indexes for the first maximum value in array.

  • idbl.png min value

    min value is of the same data type and structure as the elements in array.

  • ii32.png min index(es)

    min index(es) is the index for the first min value.

    If array is multidimensional, min index(es) is an array whose elements are the indexes for the first minimum value in array.

  • The function compares each data type according to the rules for Array Comparison.

    If a numeric array has one dimension, the max index and min index outputs are scalar integers. If a numeric array has more than one dimension, these outputs are 1D arrays that contain the indexes of the maximum and minimum values.

    If the input array is empty, max index and min index are –1.