conversion of binary to decimal

3 ビュー (過去 30 日間)
ablaze
ablaze 2017 年 3 月 29 日
コメント済み: Raed Alaa 2021 年 11 月 15 日
binary=1011 decimal=bin2dec('binary')
this code shows a error - Error using bin2dec Binary string may consist only of characters 0 and 1
Is there is method for conversion of binary to decimal through passing a variable which consists binary numbers?????
  1 件のコメント
Raed Alaa
Raed Alaa 2021 年 11 月 15 日
code matlab how to convert from binary to decimal

サインインしてコメントする。

採用された回答

David Goodmanson
David Goodmanson 2017 年 3 月 29 日
編集済み: David Goodmanson 2017 年 3 月 29 日
Hi ablaze, Your code has bin2dec trying to convert a string containing the word 'binary'. Try
a = '1011'
bin2dec(a)
  3 件のコメント
ablaze
ablaze 2017 年 3 月 29 日
thank u
Favour Oghenekowho
Favour Oghenekowho 2021 年 7 月 2 日
Hi, how can I convert Hexadecimal to excess 3 code using Matlab?

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeData Type Conversion についてさらに検索

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by