File Exchange

image thumbnail

Dictionary data structure

version 1.2 (3.18 KB) by

This class provides a simple key/value datastructure for char keys and arbitrary values

1 Download

Updated

View License

@@ ATTENTION @@
I've merged my separate submissions into KerMor/matlabtools (http://de.mathworks.com/matlabcentral/fileexchange/52299-kermor-matlabtools), which contains this submission. Please refer to that package to retrieve the current status.
@@@@
This class provides a simple key/value data structure for character keys and values of any MatLab data type.

Supports direct referencing like d('mykey') = 'myvalue'.

Also check out the dict class at #19647.
(Unfortunately i didnt check the file exchange before writing my own, but by now i've included it at many places and also need this class as prerequisite for other FileExchange downloads)

Comments and Ratings (1)

Julian

I just noticed your submission on the short-list on the MATLAB Central home-page. Looks good as dictionary data structures are certainly very useful, but I was wondering about the relationship with containers.Map class. I tend to use that class (http://www.mathworks.co.uk/help/matlab/ref/containers.mapclass.html) when I want dictionary like behaviour.

Updates

1.2

I've merged my separate submissions into KerMor/matlabtools (http://de.mathworks.com/matlabcentral/fileexchange/52299-kermor-matlabtools), which contains this submission. Please refer to that package to retrieve the current status.

1.2

- The clear method now also takes an optional single key whose associated value should be cleared
- More property descriptions (for mtoc++, see FEX #33826)

MATLAB Release
MATLAB 7.13 (R2011b)
Acknowledgements

Inspired by: dict

Inspired: KerMor/matlabtools

Download apps, toolboxes, and other File Exchange content using Add-On Explorer in MATLAB.

» Watch video