


% -*- texinfo -*-
% @deftypefn {Function File} {@var{avgbits} =} laverage (@var{codebook}, @var{problist})
%
% Compute the average word length @code{SUM(@var{i} = 1:@var{N})* Li * Pi}
% where codebook is a struct of strings, where each
% string represents the codeword. Problist is the
% probability values. For example
%
% @example
% @group
% x = @{'0','111','1110'@}; p=[0.1 0.5 0.4];
% laverage(x, p) @result{} ans = 3.2000
% @end group
% @end example
% @end deftypefn