How to convert decimal to binary which includes decimal values for eg 1.25.
조회 수: 5 (최근 30일)
이전 댓글 표시
I tried using de2bi but it doesn't account for decimal values like 1.25, 3.2, etc. If somebody has a solution to this problem.
댓글 수: 0
채택된 답변
Sreedhar Arumugam
2021년 9월 8일
It is my understanding that you want to convert a floating point number in decimal format to its binary equivalent.
The de2bi and dec2bin functions are used to convert a decimal integer to its binary representation. It will not account for the fractional part of your number.
Please refer to this answer to understand how to convert a floating point number to its binary equivalent :
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Data Type Conversion에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!