MinMax

MinMax[list]

gives the list {Min[list],Max[list]}.

MinMax[list,δ]

gives {Min[list]-δ, Max[list]+δ}.

MinMax[list,Scaled[s]]

gives {Min[list]-δ, Max[list]+δ} where δ=s×(Max[list]-Min[list]).

MinMax[list,{δmin,δmax}]

gives {Min[list]-δmin,Max[list]+δmax}.

Details

  • MinMax yields a definite result if all its arguments are real numbers.
  • In other cases, MinMax carries out some simplifications.
  • MinMax[list,] flattens out all sublists in list.
  • MinMax[{}] gives {Infinity,-Infinity}.

Examples

open allclose all

Basic Examples  (1)

Find the minimum and maximum of a list:

Pad by a fixed amount:

Pad by a fraction of the difference:

Scope  (1)

Find the minimum and maximum of a list:

Pad by a fixed amount:

Pad by a fraction of the difference:

Pad the minimum and maximum differently:

Generalizations & Extensions  (1)

When there are coordinates that are not numerical, the result is typically expressed in terms of Min and Max:

Properties & Relations  (3)

MinMax[list] is equivalent to {Min[list],Max[list]}:

In particular:

MinMax[list] is equivalent to Quantile[list,{0,1}]:

CoordinateBounds generalizes MinMax to higher dimension:

That corresponds to MinMax in each dimension:

Introduced in 2015
 (10.1)