k = {'Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', ...
'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec', 'Annual'};
v = {327.2, 368.2, 197.6, 178.4, 100.0, 69.9, ...
32.3, 37.3, 19.0, 37.0, 73.2, 110.9, 1551.0};
rainfallMap = containers.Map(k, v)
rainfallMap =
Map with properties:
Count: 13
KeyType: char
ValueType: double
The Count property is now set to the number of key/value pairs in the Map, 13, the KeyType is
char, and the ValueType is double.
Combine Map Objects
You can combine Map objects vertically using concatenation. However, the result is not a vector of
Maps, but rather a single Map object containing all key/value pairs of the contributing Maps.
Horizontal vectors of Maps are not allowed. See “Build Map with Concatenation” on page 14-10,
below.
See Also
keys | values | containers.Map
Related Examples
•
“Overview of Map Data Structure” on page 14-2
•
“Description of Map Class” on page 14-4
•
“Examine Contents of Map” on page 14-8
Create Map Object
14-7
'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec', 'Annual'};
v = {327.2, 368.2, 197.6, 178.4, 100.0, 69.9, ...
32.3, 37.3, 19.0, 37.0, 73.2, 110.9, 1551.0};
rainfallMap = containers.Map(k, v)
rainfallMap =
Map with properties:
Count: 13
KeyType: char
ValueType: double
The Count property is now set to the number of key/value pairs in the Map, 13, the KeyType is
char, and the ValueType is double.
Combine Map Objects
You can combine Map objects vertically using concatenation. However, the result is not a vector of
Maps, but rather a single Map object containing all key/value pairs of the contributing Maps.
Horizontal vectors of Maps are not allowed. See “Build Map with Concatenation” on page 14-10,
below.
See Also
keys | values | containers.Map
Related Examples
•
“Overview of Map Data Structure” on page 14-2
•
“Description of Map Class” on page 14-4
•
“Examine Contents of Map” on page 14-8
Create Map Object
14-7
