giulio
giulio

Reputation: 659

Dictionaries with matrix values in matlab

I tried to create a dictionary {integer:matrix} in matlab using container.Map but it is not possible. Is there a way to create such a dictionary?

Upvotes: 2

Views: 324

Answers (1)

articuno
articuno

Reputation: 556

Lets say i have 3 matrices a,b and c. I can achieve the task by doing this

keySet = [5,10,15];
valueSet = {a,b,c};
mapObj = containers.Map(keySet,valueSet);

Hope that helps !

Upvotes: 1

Related Questions