Code covered by the BSD License  

Highlights from
Dictionary data structure

Be the first to rate this file! 16 Downloads (last 30 days) File Size: 3.18 KB File ID: #33901

Dictionary data structure

by

 

23 Nov 2011 (Updated )

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

| Watch this File

File Information
Description

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)

Acknowledgements

Dict inspired this file.

Required Products MATLAB
MATLAB release MATLAB 7.13 (R2011b)
Tags for This File   Please login to tag files.
Please login to add a comment or rating.
Comments and Ratings (1)
19 Nov 2012 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
19 Nov 2012

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

Contact us