Legacy Documentation

Mathematica CalcCenter 2 (2002)

This is documentation for an obsolete product.
Current products and services

Documentation / CalculationCenter / Functions / Lists & Matrices / List Manipulation /

Take

FilledSmallSquare Take[list, n] gives the first n elements of list.

FilledSmallSquare Take[list, -n] gives the last n elements of list.

FilledSmallSquare Take[list, {m, n}] gives elements m through n of list.

FilledSmallSquare Take[list, {m, n, s}] gives elements m through n in steps of s.

FilledSmallSquare Take[list, , , ... ] gives a nested list in which elements specified by are taken at level i in list.

FilledSmallSquare Examples: Take[{a, b, c, d, e}, 3] LongRightArrow .

FilledSmallSquare Take[{a, b, c, d, e}, -2] LongRightArrow .

FilledSmallSquare Take[list, , ] effectively extracts a submatrix from list.

FilledSmallSquare Example: Take[{{a, b, c}, {d, e, f}}, -1, 2] LongRightArrow .

FilledSmallSquare See also: ColumnTake, Drop, Part, Partition, Select.

Examples

Using InstantCalculators

Here are the InstantCalculators for the Take function. Enter the parameters for your calculation and click Calculate to see the result.

In[1]:=

Out[1]=

In[2]:=

Out[2]=

In[3]:=

Out[3]=

In[4]=

Out[4]=

Entering Commands Directly

You can paste a template for this command via the Text Input button on the Take Function Controller.

This takes the first three elements from the list.

In[5]:=

Out[5]=

This takes the last two elements from the list.

In[6]:=

Out[6]=



ja