PRODUCTS
Mathematica
Mathematica Home Edition
Mathematica for Students
Mathematica for the Classroom
grid
Mathematica
Wolfram Lightweight Grid Manager
web
Mathematica
Mathematica Player
(free download)
Mathematica Player Pro
Wolfram
Workbench
Mathematica
Applications
SOLUTIONS
Industry
Chemical Engineering
Image Processing
Mechanical Engineering
Petroleum Engineering
Environmental Sciences
Bioinformatics
Data Analysis and Mining
Financial Risk Management
Statistics
Software Engineering
More...
Education
Higher Education
Precollege Education
Students
Technology
Interactive Deployment
High-Performance and Parallel Computing (HPC)
See Also: Technology Guide
PURCHASE
Online Store
Other Ways to Buy
Volume & Site Licensing
Contact Sales
Software
Service
Upgrades
Training
Books
FOR USERS
All User Resources
Product Registration
Technical Support
Customer Service
Developer Support
Does My Site Have a License?
Free Seminars
Learning Center
Training
Custom Group Seminars
Documentation & Examples
Tutorial Screencasts
Video Gallery
Demonstrations Project
Education Portal
Student Resources
COMPANY
About Wolfram Research
News & Events
Wolfram Blog
Employment Opportunities
History of
Mathematica
Stephen Wolfram's Home Page
Contact Us
OUR SITES
Wolfram|Alpha
Demonstrations Project
Wolfram Blog
MathWorld
Integrator
Wolfram Functions Site
Mathematica Journal
Wolfram Library Archive
Wolfram
Tones
Wolfram Science
Stephen Wolfram
DOCUMENTATION CENTER SEARCH
Mathematica
>
Core Language
>
List Manipulation
>
Elements of Lists
>
Mathematica
>
Data Manipulation
>
Handling Arrays of Data
>
Elements of Lists
>
Built-in
Mathematica
Symbol
Selecting Parts of Expressions with Functions
Tutorials »
|
Cases
Take
Drop
Reap
Pick
MatchQ
StringMatchQ
See Also »
|
Conditionals
Elements of Lists
Functional Programming
Handling Arrays of Data
Language Overview
List Manipulation
Numerical Data
More About »
Select
Select
[
list
,
crit
]
picks out all elements
e
i
of
list
for which
crit
[
e
i
]
is
True
.
Select
[
list
,
crit
,
n
]
picks out the first
n
elements for which
crit
[
e
i
]
is
True
.
MORE INFORMATION
The object
list
can have any head, not necessarily
List
.
Select
can be used on
SparseArray
objects.
»
EXAMPLES
CLOSE ALL
Basic Examples
(3)
Select elements that are even:
In[1]:=
Out[1]=
Use a pure function to test each element:
In[1]:=
Out[1]=
Return only the first expression selected:
In[1]:=
Out[1]=
Scope
(1)
Generalizations & Extensions
(2)
Applications
(7)
Properties & Relations
(1)
SEE ALSO
Cases
Take
Drop
Reap
Pick
MatchQ
StringMatchQ
TUTORIALS
Selecting Parts of Expressions with Functions
MORE ABOUT
Conditionals
Elements of Lists
Functional Programming
Handling Arrays of Data
Language Overview
List Manipulation
Numerical Data
RELATED LINKS
Demonstrations with Select
(
Wolfram Demonstrations Project
)
NKS|Online
(
A New Kind of Science
)
New in 1 | Last modified in 5