PRODUCTS
Products Overview
Mathematica
Mathematica for Students
Mathematica Home Edition
Wolfram
CDF Player
(free download)
Computable Document Format (CDF)
web
Mathematica
grid
Mathematica
Wolfram
Workbench
Wolfram
Finance Platform
Mathematica
Add-Ons
Wolfram|Alpha Products
SOLUTIONS
Solutions Overview
Engineering
Aerospace Engineering & Defense
Chemical Engineering
Control Systems
Electrical Engineering
Image Processing
Industrial Engineering
Materials Science
Mechanical Engineering
Operations Research
Optics
Petroleum Engineering
Biotechnology & Medicine
Bioinformatics
Medical Imaging
Finance, Statistics & Business Analysis
Actuarial Sciences
Data Analysis & Mining
Econometrics
Economics
Financial Engineering & Mathematics
Financial Risk Management
Statistics
Software Engineering & Content Delivery
Authoring & Publishing
Interface Development
Software Engineering
Web Development
Science
Astronomy
Biological Sciences
Chemistry
Environmental Sciences
Geosciences
Social & Behavioral Sciences
Design, Arts & Entertainment
Game Design, Special Effects & Generative Art
Education
STEM Education Initiative
Higher Education
Community & Technical College Education
Primary & Secondary Education
Students
Technology
Computable Document Format (CDF)
High-Performance & Parallel Computing (HPC)
See Also: Technology Guide
PURCHASE
Online Store
Other Ways to Buy
Volume & Site Licensing
Contact Sales
Software
Service
Upgrades
Training
Books
Merchandise
SUPPORT
Support Overview
Knowledge Base
Learning Center
Community & Forums
Training
Does My Site Have a License?
Wolfram User Portal
COMPANY
About Wolfram Research
News & Events
Wolfram Blog
Partnerships
Employment Opportunities
History of
Mathematica
Stephen Wolfram's Home Page
Contact Us
OUR SITES
All Sites
Wolfram|Alpha
Demonstrations Project
MathWorld
Integrator
Wolfram Functions Site
Mathematica Journal
Wolfram Media
Wolfram
Tones
Wolfram Science
Stephen Wolfram
DOCUMENTATION CENTER SEARCH
New to
Mathematica
?
Find your learning path
»
Mathematica
>
Core Language
>
List Manipulation
>
Rearranging & Restructuring Lists
>
Split
>
Mathematica
>
Data Manipulation
>
Handling Arrays of Data
>
Rearranging & Restructuring Lists
>
Split
>
Mathematica
>
Data Manipulation
>
Image Processing & Analysis
>
Basic Image Manipulation
>
Handling Arrays of Data
>
Rearranging & Restructuring Lists
>
Split
>
BUILT-IN MATHEMATICA SYMBOL
Partitioning and Padding Lists
Tutorials »
|
SplitBy
Partition
StringSplit
FindClusters
Union
Flatten
ReplaceList
Tally
BinLists
GapPenalty
See Also »
|
Discrete & Integer Data
List Manipulation
Rearranging & Restructuring Lists
More About »
Split
Split
[
list
]
splits
list
into sublists consisting of runs of identical elements.
Split
treats pairs of adjacent elements as identical whenever applying the function
test
to them yields
True
.
MORE INFORMATION
The default function used to test whether elements are identical is
SameQ
.
Split
can be used to perform run-length encoding.
»
EXAMPLES
CLOSE ALL
Basic Examples
(1)
In[1]:=
Out[1]=
Generalizations & Extensions
(5)
Split in increasing runs of elements:
Decreasing runs of elements:
Split based on first elements:
Split at jumps:
Split so that in each sublist successive elements are not the same:
Split after every occurrence of
:
Split before every occurrence of
:
Applications
(4)
Group together identical elements:
Run-length encoding:
Group equivalence classes according to an equivalence function:
Distribution of lengths of runs of 0s or 1s in the first million bits of
:
Distribution of lengths of runs of 0s or 1s in one million pseudorandom bits:
Properties & Relations
(1)
Flatten
acts an inverse of
Split
:
Neat Examples
(2)
Find runs of numbers in base 10 that contain the same number of 1s:
Iterated run-length encoding :
SEE ALSO
SplitBy
Partition
StringSplit
FindClusters
Union
Flatten
ReplaceList
Tally
BinLists
GapPenalty
TUTORIALS
Partitioning and Padding Lists
MORE ABOUT
Discrete & Integer Data
List Manipulation
Rearranging & Restructuring Lists
RELATED LINKS
NKS|Online
(
A New Kind of Science
)
New in 3