Filter löschen
Filter löschen

i want to know how many times a value repeated in excel

1 Ansicht (letzte 30 Tage)
Mohammed
Mohammed am 6 Nov. 2012
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?

Antworten (2)

Thomas
Thomas am 6 Nov. 2012
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 Kommentare
Thomas
Thomas am 6 Nov. 2012
a=[1 2 3 4 5 5 5 6]; % a was your input series of numbers
Mohammed
Mohammed am 8 Nov. 2012
[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)']

Melden Sie sich an, um zu kommentieren.


Matt J
Matt J am 6 Nov. 2012
Read the data in using XLSREAD. Then use HISTC.

Kategorien

Mehr zu Data Import from MATLAB finden Sie in Help Center und File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by