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