Simply put I have an N x M matrix and I would like to obtain a 256 bin histogram for each column of the matrix. I know how to do this with a for loop, but I need to do it in matrix notation to save valuable computation time.
Also, I would like to use imhist rather than hist.
For loop method:
data = randint(100,100,10);
for n = 1:100
k(:,n) = imhist(data(n,:));
end