MATLAB怎么实现浮点数到16进制的转换(float)。
조회 수: 16 (최근 30일)
이전 댓글 표시
MATLAB怎么实现浮点数到16进制的转换(float)? 比如10.5我想转换为相应16进制float类型,转换后应该是有4个字节共32位,16位到浮点数转换可以用a = '45438971'b = typecast(uint32(hex2dec(a)),'single')实现,想问下反过来怎么操作?
댓글 수: 0
채택된 답변
hirocer zhang
2023년 3월 30일
a = '45438971'
b = typecast(uint32(hex2dec(a)),'single')
sprintf('%tx',single(b))
댓글 수: 0
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Logical에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!