Download this file
1 2 3 4 5 6 7 8 9 10
function I=MI(P) % mutual information I=H[xy]-H[x]-H[y] px=sum(P,1); py=sum(P,2); I=-H(P)+H(px)+H(py); % ignore larger-than-possible values` %% if I>1.1 %% I=0 %% end