How do I extract a vector of results from a map?
4 次查看(过去 30 天)
显示 更早的评论
Suppose:
X=[1 3 4 7 14];
Y=[0.4 6.2 5.1 0.9 3.8];
myMap=containers.Map(X,Y);
I can write myMap(4) and get the expected result 5.1. If Z=[4] I can write myMap(Z) and get the expected result 5.1. If Z=[4 14], myMap(Z) fails.
Why can't I provide a vector of valid keys and get a vector of values?
0 个评论
采纳的回答
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Data Exploration 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!