Printing values in a GF array

11 views (last 30 days)
Scott
Scott on 24 Apr 2018
Commented: Scott on 1 May 2018
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?

Accepted Answer

Akira Agata
Akira Agata on 1 May 2018
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 Comment
Scott
Scott on 1 May 2018
Yeah, that looks like it does it. Thanks!

Sign in to comment.

More Answers (0)

Community Treasure Hunt

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

Start Hunting!