Home > freetb4matlab > comm > shannonfanodict.m

shannonfanodict

PURPOSE ^

%

SYNOPSIS ^

function cw_list=shannonfanodict(symbol,P)

DESCRIPTION ^

% -*- 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}
%

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:
Generated on Fri 22-May-2009 15:13:00 by m2html © 2003