Matlab Output Format!
1 回表示 (過去 30 日間)
古いコメントを表示
>> a=1
a =
1
>>
How to convert following format?
>> a=1
a=1
>>
1 件のコメント
DGM
2021 年 3 月 16 日
I don't know that you can get such a format. You can remove the empty lines by specifying
format compact
but trying to get it all on the same line is something else.
回答 (1 件)
ANKUR KUMAR
2021 年 3 月 16 日
You cannot format the output, but you can use disp to print in that way:
a=1;
disp('a=1')
disp(sprintf('a=%d',a))
You can use either of the last two commands.
1 件のコメント
Stephen23
2021 年 3 月 16 日
Or calling fprintf directly:
a = 1;
fprintf('a=%d\n',a)
参考
カテゴリ
Help Center および File Exchange で Workspace Variables and MAT-Files についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!