% -*- texinfo -*- % @deftypefn {Function File} {} shannonfanodict (@var{symbols},@var{symbol_probabilites}) % % Returns the code dictionary for source using shanno fano algorithm. % Dictionary is built from @var{symbol_probabilities} using the shannon % fano scheme. Output is a dictionary cell-array, which % are codewords, and correspond to the order of input probability. % % @example % @group % CW=shannonfanodict(1:4,[0.5 0.25 0.15 0.1]); % assert(redundancy(CW,[0.5 0.25 0.15 0.1]),0.25841,0.001) % shannonfanodict(1:5,[0.35 0.17 0.17 0.16 0.15]) % shannonfanodict(1:8,[8 7 6 5 5 4 3 2]./40) % @end group % @end example % @end deftypefn % @seealso{shannonfanoenc, shannonfanodec} %