function hist = histogram(data, bit) # function hist = histogram(data) # # Returns an array of histogram by given data # hist = zeros( (max(data)/bit)+bit, 1 ); for i = 1:length(data) j = (ceil(data([i])/bit)); hist([j]) = hist([j]) + 1; endfor