i want to know how many times a value repeated in excel
1 次查看(过去 30 天)
显示 更早的评论
i have an excel file that has only numbers on it, and i want to know how many times a value repeated Example: 1 2 3 4 5 5 5 6
here 5 has been repeated 3 times, how can i find that by matlab?
0 个评论
回答(2 个)
Thomas
2012-11-6
If you know which value you want to find the count of
a=[1 2 3 4 5 5 5 6]; % input values
numberofFives=sum(a==5)
7 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Data Import from MATLAB 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!