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. h=-p.*log2(p)-(1-p).*log2(1-p);