txtファイルから符号付固定小数点の16進数を読み込み、fiオブジェクトを作る方法を教えてください。
Mostrar comentarios más antiguos
下記のコードで作成される 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");
Respuesta aceptada
Más respuestas (0)
Categorías
Más información sobre 記述統計 en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!