Binary values

How do I assign the value in Binary format to a uint8/uint16 variable ?

3 件のコメント

James Tursa
James Tursa 2012 年 5 月 3 日
Please be more specific. Give us a detailed example of sample input and desired output.
Sujan
Sujan 2012 年 5 月 4 日
for examples, I have to set a = '10101111'.
Walter Roberson
Walter Roberson 2012 年 5 月 4 日
uint8(bin2dec(a))

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

回答 (1 件)

Walter Roberson
Walter Roberson 2012 年 5 月 3 日

0 投票

uint8(bin2dec(TheString))
or use bitset()

カテゴリ

タグ

質問済み:

2012 年 5 月 3 日

Community Treasure Hunt

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

Start Hunting!

Translated by