MATLAB 帮助中心
Convert octal to decimal numbers
dec = oct2dec(oct)
dec = oct2dec(oct) converts octal numbers in matrix oct to the decimal numbers in matrix dec, element by element. The rightmost digit is the least significant in both octal and decimal representations.
dec
oct
example
collapse all
Convert a 2-by-2 octal matrix to its decimal equivalent.
d = oct2dec([12 144;0 25])
d = 2×2 10 100 0 21
The octal number 144 is equivalent to 100 because 144=1(82)+4(81)+4(80)=100.
Octal numbers, specified as a row vector, a column vector, or a matrix.
Data Types: double
double
Decimal numbers, returned a row vector, a column vector, or a matrix depending on the input value and size of the input matrix.
expand all
Introduced before R2006a
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.
选择网站
选择网站以获取翻译的可用内容,以及查看当地活动和优惠。根据您的位置,我们建议您选择:。
您也可以从以下列表中选择网站:
如何获得最佳网站性能
选择中国网站(中文或英文)以获得最佳网站性能。其他 MathWorks 国家/地区网站并未针对您所在位置的访问进行优化。
美洲
欧洲
亚太
联系您当地的办事处