This is machine translation

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

Note: This page has been translated by MathWorks. Please click here
To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.


Convert octal to decimal numbers


d = oct2dec(c)


d = oct2dec(c) converts an octal matrix c to a decimal matrix d, element by element. In both octal and decimal representations, the rightmost digit is the least significant.


collapse all

Convert a 2-by-2 octal matrix its decimal equivalent.

d = oct2dec([12 144;0 25])
d = 

    10   100
     0    21

The octal number 144 is equivalent to 100 because .

Extended Capabilities

C/C++ Code Generation
Generate C and C++ code using MATLAB® Coder™.

See Also

Introduced before R2006a

Was this topic helpful?