Printing values in a GF array

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

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

Yeah, that looks like it does it. Thanks!

Sign in to comment.

More Answers (0)

Asked:

on 24 Apr 2018

Commented:

on 1 May 2018

Community Treasure Hunt

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

Start Hunting!