符号付固定小数点型f​iオブジェクトの行列​を16進数でCSV出​力する方法を教えてく​ださい。

3 views (last 30 days)
K_S_
K_S_ on 20 Jul 2022
Commented: K_S_ on 20 Jul 2022
現在、ワークスペースに下記のような
64ビット符号付固定小数点型fiオブジェクトの行列(1×100のembedded.fi) a_fi があります。
これを16進数でcsv出力する方法を教えていただきたいです。よろしくお願いいたします。
a = randn(1,100);
T = numerictype(true,64,60);
F = fimath('OverflowMode', 'saturate',...
'RoundMode', 'round',...
'SumMode', 'FullPrecision',...
'ProductMode', 'FullPrecision',...
'MaxProductWordLength', 256,...
'MaxSumWordLength', 256);
a_fi = fi(a,T,F);

Accepted Answer

Hernia Baby
Hernia Baby on 20 Jul 2022
hex関数をお使いください
a = fi((magic(3)/10), 1, 16, 12);
b = hex(a)
b = 3×18 char array
'0ccd 019a 099a' '04cd 0800 0b33' '0666 0e66 0333'
  2 Comments
K_S_
K_S_ on 20 Jul 2022
無事できました。ありがとうございました。

Sign in to comment.

More Answers (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!