Hello, i have an example array a= [2,2,2,1,1,3,2,1,3,3,2] i do this code
a= [2,2,2,1,1,3,2,1,3,3,2] unique(a) histc(a, unique(a))
but, it only result 1,2,3 and 3,5,3 as its frequency.
How to take all the value, but no one duplicate each others. it's like 2,1,3,2,1,3,2 and also with its frequency 3,2,1,1,1,2,1. Thanks in advance
No products are associated with this question.
You could build something around the following example:
>> b = a([diff(a)~=0, false]) b = 2 1 3 2 1 3
let me know if you need help to get counts. Hint: try using DIFF as well as FIND.