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

댓글 수: 3

the cyclist
the cyclist 2015년 5월 6일
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 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일

0 개 추천

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개)

카테고리

도움말 센터File Exchange에서 Tables에 대해 자세히 알아보기

태그

질문:

2015년 5월 6일

편집:

2015년 5월 6일

Community Treasure Hunt

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

Start Hunting!

Translated by