Mathematica 9 is now available

Documentation / Mathematica / Built-in Functions / Numerical Computation / Data Manipulation /

Further Examples: Complement

This gives all those elements of the first list that do not appear in either of the other two lists.

In[1]:=

Out[1]=

Complement also works with heads other than List.

In[2]:=

Out[2]=

This defines a version of Complement that neither sorts nor removes duplicates.

In[3]:=

In[4]:=

Out[4]=

In[5]:=

Out[5]=

RelativePrimes gives the list of primes less than n and relatively prime to n.

In[6]:=

In[7]:=

Out[7]=



Any questions about topics on this page? Click here to get an individual response.Buy NowMore Information
THIS IS DOCUMENTATION FOR AN OBSOLETE PRODUCT.
SEE THE DOCUMENTATION CENTER FOR THE LATEST INFORMATION.