Home > freetb4matlab > strings > base2dec.m

base2dec

PURPOSE ^

% Convert @var{s} from a string of digits of base @var{b} into an

SYNOPSIS ^

function out = base2dec (d, base)

DESCRIPTION ^

% -*- texinfo -*-
% @deftypefn {Function File} {} base2dec (@var{s}, @var{b})
% Convert @var{s} from a string of digits of base @var{b} into an
% integer.
%
% @example
% @group
% base2dec ('11120', 3)
%      @result{} 123
% @end group
% @end example
%
% If @var{s} is a matrix, returns a column vector with one value per
% row of @var{s}.  If a row contains invalid symbols then the
% corresponding value will be NaN.  Rows are right-justified before
% converting so that trailing spaces are ignored.
%
% If @var{b} is a string, the characters of @var{b} are used as the
% symbols for the digits of @var{s}.  Space (' ') may not be used as a
% symbol.
%
% @example
% @group
% base2dec ('yyyzx', 'xyz')
%      @result{} 123
% @end group
% @end example
% @seealso{dec2base, dec2bin, bin2dec, hex2dec, dec2hex}
% @end deftypefn

CROSS-REFERENCE INFORMATION ^

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