How can i create a table

1 次查看(过去 30 天)
For example:
a=2; b=6; c=;8 I would like to create a table like
Times Frequency Value
--------------------------------
2 6 8
  3 个评论
Lily
Lily 2015-5-6
I like to display my three variables to the screen like this
Walter Roberson
Walter Roberson 2015-5-6
Well that's what my code does.

请先登录,再进行评论。

采纳的回答

Walter Roberson
Walter Roberson 2015-5-6
编辑:Walter Roberson 2015-5-6
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

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Tables 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by