Finding most frequent element in a cell array without using unique function?
显示 更早的评论
Hello I am stuck trying to figure small block of code. I have cell array of repeating strings and numbers(class double) corresponding to the strings.
Name Score
'John' 90
'Mat' 99
'John' 98
'Tonny' 88
'Carl' 99
'Rem' 88
'Tonny' 99
How do I count the number of times the same name appears and the total score they got. For instance the total score for 'John' would be 188. I know you can use unique function to do it, but is there other way to do it beside using unique. It would be great if you guys could help me out. Thanks
采纳的回答
更多回答(0 个)
类别
在 帮助中心 和 File Exchange 中查找有关 Shifting and Sorting Matrices 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!