Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我在 Matlab 中有一个名为 myMap 的地图,带有string,int对。 我想对所有值执行一个操作(比如给所有值加 2)。我该怎么做 ? 我试过
string,int
myMap(keys(myMap)) = myMap(keys(myMap)) + 2
但它给出了错误。
myMap=containers.Map(myMap.keys,cell2mat(myMap.values)+2)