Nested maps in MATLAB

22 visualizaciones (últimos 30 días)
Mehdi
Mehdi el 14 de Nov. de 2013
Respondida: Roland el 10 de Abr. de 2017
I know it is possible to create a map within another map. For example, I can have:
mpMainMap = containers.Map();
mpMain('Key1') = containers.Map('Key2',2);
Is there any way to access the values of the second map directly (ie. without assigning it to a temporary variable first).
Any information is appreciate. Thanks

Respuestas (1)

Roland
Roland el 10 de Abr. de 2017
or on github:
The syntax for setting an value is the following:
NMapobj = MapNested(); %constructor;
NMapobj(key1, key2, key3) = value;
for retrieving:
value = NMapobj(key1, key2, key3);

Categorías

Más información sobre Dictionaries en Help Center y File Exchange.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by