Navigation

Operators and Keywords

Function List:

C++ API

: base2dec (s, base)

Convert s from a string of digits in base base to a decimal integer (base 10).

base2dec ("11120", 3)
   ⇒ 123

If s is a string matrix, return a column vector with one value per row of s. If a row contains invalid symbols then the corresponding value will be NaN.

If s is a cell array of strings, return a column vector with one value per cell element in s.

If base is a string, the characters of base are used as the symbols for the digits of s. Space (’ ’) may not be used as a symbol.

base2dec ("yyyzx", "xyz")
   ⇒ 123

See also: dec2base, bin2dec, hex2dec.

Package: octave