This is documentation for Mathematica 5, which was
based on an earlier version of the Wolfram Language.
View current documentation (Version 11.2)

Documentation / Mathematica / The Mathematica Book / A Practical Introduction to Mathematica / Lists /

1.8.11 Ordering in Lists

Ordering in lists.

Here is a list.

In[1]:= t = {17, 21, 14, 9, 18}


This gives the smallest element in the list.

In[2]:= Min[t]


This gives in order the positions of the 3 smallest elements.

In[3]:= Ordering[t, 3]


Here are the actual elements.

In[4]:= t[[%]]