Home > freetb4matlab > info-theory > narysource.m

narysource

PURPOSE ^

%

SYNOPSIS ^

function opdist=narysource(pdist,order)

DESCRIPTION ^

% -*- texinfo -*-
% @deftypefn {Function File} {} narysource (@var{probability_dist},@var{n_order})
%
% This function creates a N-ary order source using the given
% @var{probability_dist}  (as a column vector) of a 1-order source
% building a probability distribution of size
% len(@var{probability_dist})^@var{order}. Basically
% if you have X-symbol distribution with a N-ary source then we have,
% in the resultant N-ary source with a X^N symbols. The function is equivalent
% to the definitions of a q-ary order source.
%
% @example
% @group
%  pdist=[1 2 3 4]./10;
%  ndist = narysource(pdist,2)
%        @result{}  [ 0.010000   0.020000   0.030000   0.040000   0.020000 0.040000   0.060000   0.080000   0.030000   0.060000    0.090000   0.120000   0.040000   0.080000   0.120000   0.160000]
% @end group
% @end example
% @end deftypefn
% @seealso{entropy}

CROSS-REFERENCE INFORMATION ^

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