MATLAB: How remove frequent values

frequent values

hi,
is there a command can remove frequent values from vector?
thanks

Best Answer

x = floor(rand(1, 100)*10);
[N, Bin] = histc(x, unqiue(x));
Now you can use sort(N) to find the most frequent elements. Then you can search the corrsponding indices in Bin.