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:

In[1]:=
Click for copyable input
Out[1]=

Pad by a fixed amount:

In[2]:=
Click for copyable input
Out[2]=

Pad by a fraction of the difference:

In[3]:=
Click for copyable input
Out[3]=

Scope  (1)

Generalizations & Extensions  (1)

Properties & Relations  (3)

See Also

Min  Max  Interval  CoordinateBounds  CoordinateBoundingBox  Between  Quantile

Introduced in 2015
(10.1)