% -*- texinfo -*- % @deftypefn {Function File} {} arithmetic_encode (@var{message}, @var{symbol_probabilites_list}) % % Computes the arithmetic code for the message with symbol % probabilities are given. The arithmetic coding procedure assumes % that @var{message} is a list of numbers and the symbol probabilities % correspond to the index. For example % % @example % @group % symbols=[1,2,3,4]; sym_prob=[0.5 0.25 0.15 0.10]; % message=[1, 1, 2, 3, 4]; % arithmetic_encode(message,sym_prob) ans=0.18078 % @end group % @end example % @end deftypefn % @seealso{arithmetic_decode}