MATLAB怎么实现浮点数到16进制的转换(float)。
19 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
vaehang
am 30 Mär. 2023
Beantwortet: hirocer zhang
am 30 Mär. 2023
MATLAB怎么实现浮点数到16进制的转换(float)? 比如10.5我想转换为相应16进制float类型,转换后应该是有4个字节共32位,16位到浮点数转换可以用a = '45438971'b = typecast(uint32(hex2dec(a)),'single')实现,想问下反过来怎么操作?
0 Kommentare
Akzeptierte Antwort
hirocer zhang
am 30 Mär. 2023
a = '45438971'
b = typecast(uint32(hex2dec(a)),'single')
sprintf('%tx',single(b))
0 Kommentare
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Logical finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!