To create a dictionary in Matlab with a variable of type double as the key and a cell array as the value, you can use the containers.Map class.
Here is an example code snippet:
main.m345 chars16 lines
In the above code, we create a dictionary myDict with the key type double and the value type any (which allows for any type of value, including a cell array). We then add two entries to the dictionary, with double variables key1 and key2 as the keys and cell arrays val1 and val2 as the values. Finally, we access and print the values in the dictionary using the keys.
gistlibby LogSnag