| Contents | Index |
Identify keys of containers.Map object
keySet = keys(mapObj)
keySet = keys(mapObj) returns cell array keySet, which contains all of the keys in mapObj.
mapObj |
Object of class containers.Map. |
keySet |
1-by-n cell array, where n is the number of keys in mapObj. |
Create a map, and view the keys in the map:
myKeys = {'a','b','c'};
myValues = [1,2,3];
mapObj = containers.Map(myKeys,myValues);
keySet = keys(mapObj)This code returns 1-by-3 cell array keySet:
keySet =
'a' 'b' 'c'containers.Map | isKey | remove | values

Explore how to use MATLAB to make advancements in engineering and science.
| © 1984-2012- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |