function  MI=mutual(pxy)
    if (any(any(pxy<0)))
        error('Negative probability')
    end
    pxy=pxy/sum(sum(pxy));
    px=sum(pxy,1);
    py=sum(pxy,2);    
    MI= -my_entropy(pxy) +my_entropy(px)+my_entropy(py);