This is machine translation

Translated by Microsoft
Mouse over text to see original. Click the button below to return to the English verison of the page.


Convert base N number string to decimal number


d = base2dec('strn', base)


d = base2dec('strn', base) converts the string number strn of the specified base into its decimal (base 10) equivalent. base must be an integer between 2 and 36. strn must represent a nonnegative integer value. If strn represents an integer value greater than 2^52, base2dec might not return an exact conversion.

If strn is a character array, each row is interpreted as a string in the specified base.


The expression base2dec('212',3) converts 2123 to decimal, returning 23.

See Also

Was this topic helpful?