txtファイルから符号付固定小数点の16進数を読み込み、fiオブジェクトを作る方法を教えてください。
Afficher commentaires plus anciens
下記のコードで作成される 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");
Réponse acceptée
Plus de réponses (0)
Catégories
En savoir plus sur 記述統計 dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!