How can I convert an array of binary values into the corresponding decimal number within MATLAB?
Show older comments
I have an array of values that represents the binary value of a number. For example:
x = [1 0 0 0 0 0 0 0];
is used to represent the binary value 10000000, which is the decimal value 128. The BIN2DEC function is used to convert binary strings into decimal numbers. I would like to convert my array into the corresponding decimal value.
Accepted Answer
More Answers (0)
Categories
Find more on Data Type Conversion in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!