8桁のIEEE16進数表示を10進数に変換する方法?
9 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Lei Ding
le 21 Jan 2022
Commenté : Lei Ding
le 22 Jan 2022
以下のように、単精度の数値をhexに変換できるが、逆変換(B⇒Aに変換)の方法はありますか?
A=single(13.17647076);
B = num2hex(A); ⇒ B = '4152d2d3';
0 commentaires
Réponse acceptée
Toshinobu Shintai
le 21 Jan 2022
Modifié(e) : Toshinobu Shintai
le 21 Jan 2022
'4152d2d3' が単精度浮動小数点数の16進数表示であるとする場合、「typecast」というコマンドで以下のように変換できます。
format long
B = 0x4152d2d3
A = typecast(B, 'single')
Plus de réponses (0)
Voir également
Produits
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!