How do I save a Galois Field array to a file in MATLAB 7.8( R2009a)

4 ビュー (過去 30 日間)
I have created a Galois Field array using the GF command in Communication Toolbox 4.3 (R2009a). I want to write this array to a file using FWRITE. When I try to write it using the following MATLAB code:
x = 0:3;
m = 2;
a = gf(x,m);
fid=fopen('output1.txt','w');
fwrite(fid,a,'ubit1');
fclose(fid);
I get an error message:
??? Error using ==> fwrite
Cannot write value: unsupported class gf

採用された回答

MathWorks Support Team
MathWorks Support Team 2009 年 6 月 27 日
The ability to directly write a Galois Field array to a file is not supported in MATLAB 4.3 (R2009a).
In order to write a galois field array, one needs to convert the GF object to a double and then write to a file. For instance:
x = 0:3;
m = 2;
a = gf(x,m);
a_new =double(a.x);
fid=fopen('output1.txt','w');
fwrite(fid,a_new,'ubit1');
fclose(fid);

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeError Detection and Correction についてさらに検索

タグ

製品


リリース

R2009a

Community Treasure Hunt

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

Start Hunting!

Translated by