D = bin2dec( binStr ) converts the binary integer represented by binStr to the equivalent decimal number and returns it as a double-precision floating-point value.
How to convert a binary vector to decimal in MATLAB?
d = bi2de( b ) converts a binary row vector b to a decimal integer. d = bi2de( b , flg ) converts a binary row vector to a decimal integer, where flg determines the position of the most significant digit. d = bi2de( b , p ) converts a base- p row vector b to a decimal integer.
How to convert binary to decimal?
Step-1 First we need to multiply 0 with 2 and add the 1st digit in binary number. Step-2 Now use the result of above step and multiply with 2 and add the second digit of binary number. The same step 2 is repeated until there will be no digit left. The final result will be the resultant decimal number.