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

Extract

Extract
extracts the part of expr at the position specified by list.
Extract
extracts a list of parts of expr.
Extract
extracts parts of expr, wrapping each of them with head h before evaluation.
  • You can use Extract[expr, ..., Hold] to extract parts without evaluation.
  • If expr is a SparseArray object, Extract extracts parts in the corresponding ordinary array.
Extract the second part from an expression:
Extract a part nested in an expression:
Extract parts from multiple positions:
Extract the parts given by Position:
Extract the second part from an expression:
In[1]:=
Click for copyable input
Out[1]=
 
Extract a part nested in an expression:
In[1]:=
Click for copyable input
In[2]:=
Click for copyable input
Out[2]=
Extract parts from multiple positions:
In[3]:=
Click for copyable input
Out[3]=
 
Extract the parts given by Position:
In[1]:=
Click for copyable input
In[2]:=
Click for copyable input
Out[2]=
In[3]:=
Click for copyable input
Out[3]=
New in 3 | Last modified in 5