I am trying to make a function for an histogram to explain the concept to students, is possible to vectorize this loop?
[x,y]=size(A); freq=zeros(256,1); for i=1:x for j=1:y value=A(i,j); freq(value+1)=freq(value+1)+1; endend
thanks in advance.
Best Answer