I have written a code:
edge = linspace(botEdge, topEdge, numBins);
[N,ind] = histc(Speed, edges);
new = find(Speed>edges,1,'last');
N(new) = N(new)+1;
For example if I give speed value from data sets say 5.5 they, the new
will tell you in which bin this value belongs and you can double check via looking the edge
value you can see in which bin this value belongs. I tested with this value and I got correct result. You can also check via running this code with giving input
Speed
is 3000x1, edge
is 50x1, N
is 50x1. This working perfectly for single value of speed
but If I want to do same thing with my all speed
data (3000x1) what should I do?