Home > freetb4matlab > strings > dec2base.m

dec2base

PURPOSE ^

% Return a string of symbols in base @var{b} corresponding to

SYNOPSIS ^

function retval = dec2base (n, base, len)

DESCRIPTION ^

% -*- texinfo -*-
% @deftypefn {Function File} {} dec2base (@var{n}, @var{b}, @var{len})
% Return a string of symbols in base @var{b} corresponding to
% the nonnegative integer @var{n}.
%
% @example
% @group
% dec2base (123, 3)
%      @result{} '11120'
% @end group
% @end example
%
% If @var{n} is a vector, return a string matrix with one row per value,
% padded with leading zeros to the width of the largest value.
%
% If @var{b} is a string then the characters of @var{b} are used as
% the symbols for the digits of @var{n}.  Space (' ') may not be used
% as a symbol.
%
% @example
% @group
% dec2base (123, 'aei')
%      @result{} 'eeeia'
% @end group
% @end example
%
% The optional third argument, @var{len}, specifies the minimum
% number of digits in the result.
% @seealso{base2dec, dec2bin, bin2dec, hex2dec, dec2hex}
% @end deftypefn

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:
Generated on Sat 16-May-2009 00:04:49 by m2html © 2003