Binary values

1 次查看(过去 30 天)
Sujan
Sujan 2012-5-3
How do I assign the value in Binary format to a uint8/uint16 variable ?
  3 个评论
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
uint8(bin2dec(TheString))
or use bitset()

类别

Help CenterFile Exchange 中查找有关 Data Types 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by