Main Content
size
Size of Map
object
Description
Note
dictionary
is recommended over
containers.Map
because it accepts more data types as
keys and values and provides better performance. (since R2022b)
n = size(
returns the number of
key-value pairs in the input M
,1)Map
object.
size(M,1)
is equivalent to length(M)
and
to the property M.Count
.
sz = size(
returns a two-element
vector M
)[n 1]
, where n
is the number of
key-value pairs in M
.
[sz1,sz2,...,szL] = size(
returns
M
)[n,1,...,1]
.
Examples
Input Arguments
Version History
Introduced in R2008b
See Also
dictionary
| containers.Map
| isKey
| keys
| length
| values