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()

카테고리

도움말 센터File Exchange에서 Logical에 대해 자세히 알아보기

태그

질문:

2012년 5월 3일

Community Treasure Hunt

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

Start Hunting!

Translated by