


% -*- texinfo -*-
% @deftypefn {Function File} {} entropy (@var{symbol_probabilites}, @var{base})
%
% Computes the Shannon entropy of a discrete source whose
% probabilities are by @var{symbol_probabilities}, and optionally
% @var{base} can be specified. Base of logarithm defaults to 2,
% when the entropy can be thought of as a measure of bits
% needed to represent any message of the source. For example
%
% @example
% @group
% entropy([0.25 0.25 0.25 0.25]) @result{} ans = 2
% entropy([0.25 0.25 0.25 0.25],4) @result{} ans = 1
% @end group
% @end example
% @end deftypefn