function H=myhist(I);

I=double(I);
[height,width]=size(I);

H=zeros(1,256);

for j=1:height,
    for i=1:width,
        H(I(i,j)+1)=H(I(i,j)+1)+1;
    end
end