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.
string,intMatlab にペアを持つ myMap という名前のマップがあります。 すべての値に対して操作を実行したい (たとえば、すべての値に 2 を追加する)。どうすればできますか? 私は試した
string,int
myMap(keys(myMap)) = myMap(keys(myMap)) + 2
しかし、それはエラーを出します。
myMap=containers.Map(myMap.keys,cell2mat(myMap.values)+2)