Computes the minimum and the maximum value of an array. More...

Modules

 minmax
 The C++ interface for minmax.
 
 af_minmax
 the C interface for minmax
 

Detailed Description

Computes the minimum and the maximum value of an array.

Returns the minimum and the maximum value along a given dimension
or for all of the elements of an array.
float ha[] = {1, 2, 3, 4, 5, 6};
array in = array(2, 3, ha);
array minvals, maxvals;
minmax(minvals, maxvals, in, 0);
print(minvals);
print(maxvals);
// minvals = 1.0000 3.0000 5.0000
// maxvals = 2.0000 4.0000 6.0000
minmax(minvals, maxvals, in, 1);
print(minvals);
print(maxvals);
// minvals = 1.0000
// 2.0000
//
// maxvals = 5.0000
// 6.0000