function entr=my_entropy(P)
    P=P+1e-300;
    entr= sum(sum(-P.*log2(P)));