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