Matlab table GroupBy values and count

Viewed 59

I have a table .csv imported into MATLAB. Now I want to find some statistics about the data.

Date Of Month No. of Items
1 5
1 4
2 20
3 1
3 2
3 7

Now I want to group the first column in a way that 2nd column sums based on the first column. Example of expected output

Date Of Month No. of Items
1 9
2 20
3 10

I have gone through the Matlab documentation on groupsummary, groupcounts etc. but could not get the desired result. Appreciate anyones help/hint on how to achieve this.

0 Answers
Related