11.2.6 Maximum and Minimum values

max( data)
This function returns the maximum value in data. The maximum value is defined as the value of the element $ x_i$ which satisfies $ x_i \ge x_j$ for all $ j$ .

If you want instead to find the element with the largest absolute magnitude you will need to apply `fabs' or `abs' to your data before calling this function.

min( data)
This function returns the minimum value in data. The maximum value is defined as the value of the element $ x_i$ which satisfies $ x_i \le x_j$ for all $ j$ .

If you want instead to find the element with the smallest absolute magnitude you will need to apply `fabs' or `abs' to your data before calling this function.

minmax( data)
This function returns both the minimum and maximum values of data, determined in a single pass.

max_index( data)
This function returns the index of the maximum value in data. The maximum value is defined as the value of the element $ x_i$ which satisfies $ x_i \ge x_j$ for all $ j$ . When there are several equal maximum elements then the first one is chosen.

min_index( data)
This function returns the index of the minimum value in data. The minimum value is defined as the value of the element $ x_i$ which satisfies $ x_i \le x_j$ for all $ j$ . When there are several equal minimum elements then the first one is chosen.

minmax_index( data)
This function returns the indexes of the minimum and maximum values of data, determined in a single pass.