开发者

How do I build a map in Matlab?

I tried:

new_map = containers.Map('KeyType', 'double', 'ValueType', 'double')

but it doesn't work. I need a map from vector of doubles to double.

.??? No constructor 'containers.Map' with matching signatu开发者_如何学JAVAre found.


Try the following workaround for pre 2010a versions of matlab.

key1 = 1.0;
val1 = 1.0;
mapObj = containers.Map(key1, val1);
remove(mapObj, key1);
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜