Mathematica 9 is now available
 Documentation / Mathematica / Built-in Functions / New in Version 3.0 / Lists and Matrices  /
Split

  • Split[ list ] splits list into sublists consisting of runs of identical elements.
  • Split[ list , test ] treats pairs of adjacent elements as identical whenever applying the function test to them yields True.
  • Example: Split[ a, a, b, b, a, a, b ].
  • The default function used to test whether elements are identical is SameQ.
  • Split can be used to perform run-length encoding.
  • See the Mathematica book: Section 1.8.10.
  • See also: Partition, Union, Flatten, ReplaceList.


    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.