フィルターのクリア

Putting spacing between strings

1 回表示 (過去 30 日間)
Yoshi
Yoshi 2016 年 1 月 23 日
編集済み: jgg 2016 年 1 月 23 日
I am trying to print out something like this:
A (10 blank spaces) B (10 blank spaces) C
any ideas?
  3 件のコメント
Yoshi
Yoshi 2016 年 1 月 23 日
ABC are supposed to be singular values such as 7,8,9
jgg
jgg 2016 年 1 月 23 日
Then the second example there should work. I'll submit it as an answer.

サインインしてコメントする。

回答 (1 件)

jgg
jgg 2016 年 1 月 23 日
編集済み: jgg 2016 年 1 月 23 日
You can do this by sending them to strings then concatenating them:
A = 1;
B = 8;
C= 9;
space = ' ';
str = [num2str(A),space,num2str(B),space,num2str(C)];
disp(str)
or you can print str to a file (it's unclear what you mean by "print out")

カテゴリ

Help Center および File ExchangeCharacters and Strings についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by