Real Value Conversion to Binary with Range

Again, i write on the same topic. Sorry for that.
Within the range values (e.g. [0,25]) how can i convert my real numbers to binary digits. The number of bits must be 15..
Thanks

 채택된 답변

Walter Roberson
Walter Roberson 2012년 5월 11일

0 개 추천

dec2bin(round(Values * 2^10), 15) - '0'

추가 답변 (1개)

b
b 2012년 5월 11일

0 개 추천

Thanks again.
Do you have any idea to convert the binary digits to real values??

댓글 수: 1

Walter Roberson
Walter Roberson 2012년 5월 11일
Let B be the binary digits. Then
bin2dec(char(B + '0')) ./ 2^10

댓글을 달려면 로그인하십시오.

카테고리

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

질문:

b
b
2012년 5월 11일

Community Treasure Hunt

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

Start Hunting!

Translated by