%crossentropy.m
%Importance of cross-entropy 
temp=rand(1,5); 
p=temp/sum(temp); 
Entropy=sum(-p.*log(p));
COL=[];
for i=1:1:100
    temp=rand(1,5);
    q=temp/sum(temp); 
    COL=[COL sum(-p.*log(q))]
end
figure 
plot(Entropy*ones(1,100)) 
hold on 
plot(COL,'r')

