convert binary vector value into decimal
古いコメントを表示
i have
a= [0 0 1 0 1 0 1 1]
i want to convert it, into decimal value 43
回答 (3 件)
Mischa Kim
2014 年 2 月 26 日
Raza, use
bin2dec(num2str(a))
Azzi Abdelmalek
2014 年 2 月 26 日
編集済み: Azzi Abdelmalek
2014 年 2 月 26 日
a= [0 0 1 0 1 0 1 1];
b=bin2dec(sprintf('%d',a))
Andrei Bobrov
2014 年 2 月 26 日
polyval(a,2)
カテゴリ
ヘルプ センター および File Exchange で Logical についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!