Dictionaries of Hashtables in MATLAB?
131 views (last 30 days)
Philip on 13 Nov 2011
Is there a way to create a hash table or dictionary in MATLAB such that I can retrieve a set of values based on a key?
I also need to append more entries to the end of the list, given a key. I tried importing a hashtable from java.util.Hashtable, but the "add" method overwrites the current entries if a key already exists...
Thanks for all your help!
More Answers (1)
Mike Croucher on 15 Sep 2022 at 11:24
Reviving this thread in 2022 because R2022b contains a new dictionary data type. A tutorial-like introduction at An introduction to dictionaries (associative arrays) in MATLAB » The MATLAB Blog - MATLAB & Simulink (mathworks.com)