For example:
a=2; b=6; c=;8 I would like to create a table like
Times Frequency Value
--------------------------------
2 6 8

3 comentarios

the cyclist
the cyclist el 6 de Mayo de 2015
Do you mean you want to display your three variables to the screen like that, or do you mean you want to create a new variable of class table?
Or something else entirely?
Lily
Lily el 6 de Mayo de 2015
I like to display my three variables to the screen like this
Walter Roberson
Walter Roberson el 6 de Mayo de 2015
Well that's what my code does.

Iniciar sesión para comentar.

 Respuesta aceptada

Walter Roberson
Walter Roberson el 6 de Mayo de 2015
Editada: Walter Roberson el 6 de Mayo de 2015

0 votos

fprintf('%-20s %-20s %-20s\n', 'Times', 'Frequency', 'Value');
fprintf('%s\n', repmat('-', 1, 20*3+2));
fprintf('%-20d %-20d %-20d\n', a, b, c);
Output is
Times Frequency Value
--------------------------------------------------------------
2 6 8

Más respuestas (0)

Categorías

Etiquetas

Preguntada:

el 6 de Mayo de 2015

Editada:

el 6 de Mayo de 2015

Community Treasure Hunt

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

Start Hunting!

Translated by