Demo entry 6783675

Entropie

   

Submitted by anonymous on Feb 17, 2019 at 17:50
Language: Matlab. Code size: 122 Bytes.

function H=entropie(Y)
[f, z] = hist(Y,100);
s = 0 ;
n = 10000;
f
p= f/n ;
p(p==0)=[];
s=sum(p.*log(p));
H=-s*log(2) ;
end

This snippet took 0.00 seconds to highlight.

Back to the Entry List or Home.

Delete this entry (admin only).