floating point to binary conversion
조회 수: 10 (최근 30일)
이전 댓글 표시
if true
% code
if a =
-5932.62103114252
5931.17666698258
5797.34103035393
-6358.78042353988
-12430.1210180646
-9849.27324380255
-6386.88118380371
7783.15716000243
5177.38696737792
6082.47763148202
-4816.43707738488...........
end
how to convert this to binary? with out using uint8,16,64 i need the output in double
if i use uint the values are rounded off and i am not able to reconstruct (image) is there any possibilities to convert it.
because after converting it i need to modulate and transmit.
댓글 수: 0
채택된 답변
추가 답변 (1개)
Image Analyst
2014년 4월 28일
I don't know what you mean. The image already is in double. What do you mean by "binary"? You mean binary like a binary image, where the pixels are true or false and the data type is logical? You can create that by thresholding and casting to double:
binaryImage = a < 1000; % Whatever value... binaryImage is of type "logical".
doubleImage = double(binaryImage); % Make double.
What are you talking about uint8, uint16, etc. Those aren't binary except in the sense that ALL numbers in a computer are binary. Maybe you want the dec2bin() function to turns numbers into strings of 0's and 1's.
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Convert Image Type에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!