| MATLAB® | ![]() |
bin2dec(binarystr)
bin2dec(binarystr) interprets the binary string binarystr and returns the equivalent decimal number.
bin2dec ignores any space (' ') characters in the input string.
Binary 010111 converts to decimal 23:
bin2dec('010111')
ans =
23Because space characters are ignored, this string yields the same result:
bin2dec(' 010 111 ')
ans =
23![]() | bicgstabl | binary | ![]() |

Includes the most popular MATLAB recorded presentations with Q&A sessions led by MATLAB experts.
| © 1984-2009- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |