DOCUMENTATION CENTER SEARCH
Mathematica
>
Expression Structure
>
Built-in
Mathematica
Symbol
Controlling the Display of Large Expressions
Vectors and Matrices
Manipulating Expressions like Lists
Tutorials »
|
LeafCount
ByteCount
Depth
StringLength
AtomQ
ComplexityFunction
LengthWhile
See Also »
|
Elements of Lists
Expressions
Expression Structure
Handling Arrays of Data
Language Overview
List Manipulation
Math & Counting Operations on Lists
Memory Measurement & Optimization
Operations on Vectors
Parts of Expressions
More About »
Length
Length
[
expr
]
gives the number of elements in
expr
.
MORE INFORMATION
When
expr
is a
SparseArray
object,
Length
[
expr
]
returns the length of the corresponding ordinary list.
»
Otherwise,
Length
[
expr
]
returns
0
whenever
AtomQ
[
expr
]
is
True
.
EXAMPLES
CLOSE ALL
Basic Examples
(1)
Find the length of a list:
In[1]:=
Out[1]=
Scope
(2)
Generalizations & Extensions
(4)
Applications
(5)
Properties & Relations
(1)
Possible Issues
(5)
SEE ALSO
LeafCount
ByteCount
Depth
StringLength
AtomQ
ComplexityFunction
LengthWhile
TUTORIALS
Controlling the Display of Large Expressions
Vectors and Matrices
Manipulating Expressions like Lists
MORE ABOUT
Elements of Lists
Expressions
Expression Structure
Handling Arrays of Data
Language Overview
List Manipulation
Math & Counting Operations on Lists
Memory Measurement & Optimization
Operations on Vectors
Parts of Expressions
RELATED LINKS
NKS|Online
(
A New Kind of Science
)
New in 1 | Last modified in 5
© 2008 Wolfram Research, Inc.