필터 지우기
필터 지우기

Real Value Conversion to Binary with Range

조회 수: 5 (최근 30일)
b
b 2012년 5월 11일
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일
dec2bin(round(Values * 2^10), 15) - '0'

추가 답변 (1개)

b
b 2012년 5월 11일
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

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

카테고리

Help CenterFile Exchange에서 Data Type Conversion에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by