returns a list of the ei for which the value of f[ei] is minimal.
returns a list of the ei corresponding to the n smallest f[ei].
- Values of f[ei] are compared using the same canonical order as in Sort.
- The minimal ei are returned in the order they appear in the input.
- In the case of MinimalBy[list,f,n], the ei are sorted in the order of increasing f[ei], with those having the same value of f[ei] being taken in the order they appear in list.
- MinimalBy[list,f, UpTo[n]] gives n elements, or as many as are available.
- MinimalBy[f][expr] is equivalent to MinimalBy[expr,f].
Examplesopen all close all
Basic Examples (4)
Possible Issues (1)
Introduced in 2014Updated in 2015