I'm generating an array of Galois field elements, and I'd like to print the value of each element of the array. As an example,
r0 = gf((0:1023),10,1387);
fprintf('r0: %i\n',r0(1))
Any ideas? Is there a format specifier I can use, or some conversion to integer or double I could use?

 採用された回答

Akira Agata
Akira Agata 2018 年 5 月 1 日

0 投票

Like this?
r0 = gf((0:1023),10,1387);
val = r0.x;
for kk = 1:numel(val)
fprintf('r0(%d): %d\n',kk,val(kk))
end

1 件のコメント

Scott
Scott 2018 年 5 月 1 日
Yeah, that looks like it does it. Thanks!

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

質問済み:

2018 年 4 月 24 日

コメント済み:

2018 年 5 月 1 日

Community Treasure Hunt

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

Start Hunting!

Translated by