Main Content
length
Number of key-value pairs in Map
object
Syntax
Description
Note
dictionary
is recommended over
containers.Map
because it accepts more data types as
keys and values and provides better performance. (since R2022b)
L = length(
returns the number of
key-value pairs in the input M
)Map
object.
length(M)
is equivalent to size(M,1)
and
to the property M.Count
.
Examples
Input Arguments
Version History
Introduced in R2008b