Skip to content

Instantly share code, notes, and snippets.

@shaybensasson
Created June 4, 2015 13:45
Show Gist options
  • Select an option

  • Save shaybensasson/ef8cf900bbe9c7728d8a to your computer and use it in GitHub Desktop.

Select an option

Save shaybensasson/ef8cf900bbe9c7728d8a to your computer and use it in GitHub Desktop.
matlab dictionary key value pair
newMap = containers.Map('KeyType','int32','ValueType','single');
val = 5;
if (~isKey(newMap, 31))
newMap(31)=val;
else
newMap(31)=newMap(31) + val;
end
newMap(31)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment