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?

回答(2 个)

Thomas
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 个评论
Mohammed
Mohammed 2012-11-8
[number(morethan1)' count(morethan1)']
there is an error massege in this line sir:
Error using horzcat CAT arguments dimensions are not consistent.
Error in LotteryFinder (line 10) [number(morethan1)' count(morethan1)']

请先登录,再进行评论。


Matt J
Matt J 2012-11-6
Read the data in using XLSREAD. Then use HISTC.

类别

Help CenterFile Exchange 中查找有关 Data Import from MATLAB 的更多信息

标签

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by