This question already has an answer here:
- Counting the population of integers 5 answers
I have a table of 200 elements, elements are '0', '1', '2'. I have participate them into groups for 20 elements each one. Then I have calculate how many '0', '1', '2' are in each part. And then in vectors n1, n2, n0 write the answers. For example: n1=(3,4,5,2,3,4,5,6,6,1); so there are 3 elements of '1' in first part and so on. How can I do that?