I’m struggling with the following problem:
I want to count the number of occurances for the values in an array, s.t. I can plot the result.
this is the array: A = [1,2,3,3,4,4,4,6]
and I want to find a way to get something out like: B = [ 1 1, 2 1, 3 2, 4 3, 6 1] a two dimensional array.
I tried it with loops and if conditions, but nothing has workes properly.