Entropy2.m
Upload User: loeagle
Upload Date: 2013-03-02
Package Size: 1236k
Code Size: 0k
Development Platform:

Matlab

  1. function h=entropy2(p)
  2. % h=entropy2(p) Returns the binary entropy function of the components 
  3. % of the vevtor p.
  4. n=length(p);
  5. for i=1:n
  6. p1=[p(i) 1-p(i)];
  7. h(i)=entropy(p1);
  8. end