There are many things you can do. But none will likely be perfectly satisfactory. For example, you could use uniquetol to do the "counting".
[Vuniq,I,J] = uniquetol(V,0.01);
counts = accumarray(J,1,[100,1],@sum);
[cmax,ind] = max(counts)
So the most frequent value, with a bin of 0.01, and a count of 1106 was 0.36033. The bins that were implicitly created by uniquetol have a width of approximately 0.01. This is essentially the same solution that would arise has a histogram tool been used, as long as the bin boundaries were the same.
That is, the first 10 such unique results obtained from uniquetol are:
6.2251e-06 0.010016 0.020018 0.030019 0.040023 0.050026 0.060033 0.070049 0.080051 0.090053
0.01001 0.010002 0.010001 0.010004 0.010003 0.010007 0.010016 0.010002 0.010002
But was 0.36033 the truly most common? Suppose that the most frequent count happened to cross two such bins?
As I said, there is no perfect solution, at least probably not if you want it to be fast. Are you looking for ANY interval of width 0.01 that contains the most number of elements? If so, this will get more difficult. Still doable, but possibly a bit slower, with more effort. You can see that I chose a vector V that was intentionally going to be very difficult in this respect.
Vs = sort(V);
[~,~,upperbin] = histcounts(Vs + 0.01,Vs);
[Vmaxcount,Vsind] = max(upperbin' - (0:100000 - 1))
So it looks like the interval of width 0.01 with the MAXIMUM number of elements in the vector V seems to be [0.36073,0.36073 + 0.01].
As a test:
sum((Vs >= Vs(Vsind)) & (Vs < Vs(Vsind) + 0.01))
So arguably, the true moving mode, with an interval width of 0.01 is:
Vs(Vsind) + 0.01/2
Surprisingly the best interval of width 0.01 was actually one that overlapped with the one that uniquetol found. But there is no reason this must happen. Had I chosen a different random set of data, that could easily change.
Anyway, because I was able to use efficient tools for this, it was even pretty fast.