UPC/1sem/octave/04/alph_redundancy.m
2019-11-22 22:51:59 +07:00

5 lines
122 B
Mathematica

function [r] = alph_redundancy(P);
ent = alph_entropy(P);
mx_ent = log2(length(P))
r = 1 - ent/mx_ent;
endfunction;