MATLAB Answers

0

Nested maps in MATLAB

Mehdi 님이 질문을 제출함. 14 Nov 2013
최근 활동 Roland 님이 답변함. 10 Apr 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

  댓글 수: 0

로그인 to comment.

답변 수: 1

Roland 님의 답변 10 Apr 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);

  댓글 수: 0

로그인 to comment.



Translated by