txtファイルから符号付固定小数点の16進数を読み込み、fiオブジェクトを作る方法を教えてください。
Show older comments
下記のコードで作成される d.txt を読み込み、
元の符号付固定小数点の16進数のfiオブジェクト a_fiと同じ設定のfiオブジェクトを作成するにはどうしたらよいでしょうか。
(d.txtは、実際は外部で取得することを想定しています)
a = randn(1,10);
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);
b_fi = hex(a_fi);
c = strsplit(b_fi)';
writecell(c,"d.txt", QuoteStrings="none");
Accepted Answer
More Answers (0)
Categories
Find more on 記述統計 in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!