Im wondering how i can find the binary entropy between 0-1 without falling in the Nan value at 1?
H0 = (-p0.*log2(p0)-(1-p0).*log2(1-p0));
plot(p0,H0,'r*')
Many thanks
Im wondering how i can find the binary entropy between 0-1 without falling in the Nan value at 1?
H0 = (-p0.*log2(p0)-(1-p0).*log2(1-p0));
plot(p0,H0,'r*')
Many thanks
Copyright © 2021 JogjaFile Inc.
Remove the first ($p=0$) and last ($p=1$) element before plotting