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?

 Respuesta aceptada

Akira Agata
Akira Agata el 1 de Mayo de 2018

0 votos

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 comentario

Scott
Scott el 1 de Mayo de 2018
Yeah, that looks like it does it. Thanks!

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Preguntada:

el 24 de Abr. de 2018

Comentada:

el 1 de Mayo de 2018

Community Treasure Hunt

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

Start Hunting!

Translated by