Total data in the group

1 Ansicht (letzte 30 Tage)
Ellina
Ellina am 27 Aug. 2014
Kommentiert: Ellina am 27 Aug. 2014
Can someone help me how to calculate the sum of this data.
[7 3 11 11 10 10]
that is i would like to make
  • group 7 = 1 data
  • group 3 = 1 data
  • group 11 = 2 data
  • group 10 = 2 data

Akzeptierte Antwort

dpb
dpb am 27 Aug. 2014
>> d=[7 3 11 11 10 10];
>> u=unique(d);
>> [u;histc(d,u)]
ans =
3 7 10 11
1 1 2 2
>>
  1 Kommentar
Ellina
Ellina am 27 Aug. 2014
Thank you so much, its work.

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Kategorien

Mehr zu Get Started with 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