Make a copy of the ticketMap Map. Write to this copy, and notice that the change is
applied to the original Map object itself:
copiedMap = ticketMap;
copiedMap('AZ12345') = 'unidentified person';
ticketMap('AZ12345')
ans =
unidentified person
Clean up:
remove(ticketMap, 'AZ12345');
clear copiedMap;
See Also
containers.Map | isKey | keys | length | remove | size | values
Related Examples
- “Create Map Object” on page 14-6
- “Examine Contents of Map” on page 14-9
- “Read and Write Using Key Index” on page 14-11
- “Map to Different Value Types” on page 14-19
14 Map Containers