How do I remove white spaces on the command window after the answer prints a string?

2 ビュー (過去 30 日間)
Lance Randall Gamier
Lance Randall Gamier 2021 年 10 月 31 日
回答済み: Jan 2021 年 10 月 31 日
How do I remove white spacing indents on the left whenever the command window prints a string variable? Ex.
>> ans =
' One of the Wrong Answers is
[{MathJax fullWidth='false'
-1.44183
}]
'

回答 (2 件)

Image Analyst
Image Analyst 2021 年 10 月 31 日
I do not believe there is a user setting or preference to change that.

Jan
Jan 2021 年 10 月 31 日
Use fprintf to ontrol the output exactly. Relying on the implicit calling of display() has less ways to influence the output.

カテゴリ

Help Center および File ExchangeEntering Commands についてさらに検索

製品


リリース

R2018a

Community Treasure Hunt

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

Start Hunting!

Translated by