If a list contains duplicate elements, for example
list = {a, 1, 5, 3, 5, x^2, x^2},
how can the duplicate elements be removed? The result would be
uniqueElements = {a, 1, 5, 3, x^2}
|
If a list contains duplicate elements, for example
how can the duplicate elements be removed? The result would be
|
||||
|
You can use
|
||||
|
|
|
In version 7 or later, use the For versions of Mathematica before 7, when These methods may be obsolete for the specific function of
For Mathematica 4 or earlier
For Mathematica 5
For Mathematica 6
From Leonid Shifrin for Mathematica 3+
|
|||||||||||
|
|
If you don't care about the original order (or if you want it sorted), use
|
|||||||||||||||
|
Unionis towards the bottom, andDeleteDuplicatesis on the second page for me. For Heike, both were on the first page. However, the built-in documentation center works fine. – rcollyer Mar 1 '12 at 15:33