%% Specify Types for Empty Map
% Create an empty Map object. Specify the data types for key-value pairs added later.

M = containers.Map('KeyType','char','ValueType','double')

%
% Add key-value pairs to the map.

M('Jan') = 327.2;
M('Feb') = 368.2;
M

%
% Display the keys and values that the map now contains.

keys(M)
values(M)

% Copyright 2012 The MathWorks, Inc.