Sum and Sort Values from Multiple Vectors
显示 更早的评论
I have a numerical vector:
Time = [10 23 54 50]
This corresponds to the string vector:
Place = [A B C A]
And another string vector:
Unique = [A B C]
How do I count these so that I get the following result:
x = [60 23 54]
This is just a snippet of the actual data - the full data set is at least 5000 long. I figured an if loop would work but I'm having trouble visualising and writing the code out.
Any help would be much appreciated. Thanks :)
2 个评论
per isakson
2019-5-26
编辑:per isakson
2019-5-26
A B C are they names of variables or what?
Patrick Rungrugeecharoen
2019-5-26
采纳的回答
更多回答(0 个)
类别
在 帮助中心 和 File Exchange 中查找有关 String 的更多信息
产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!