remove indent in command window

1 回表示 (過去 30 日間)
Jichie
Jichie 2022 年 9 月 22 日
コメント済み: Rik 2022 年 9 月 22 日
I just started matlab and I want to remove the indent in this equation, the answer is from a basic arithmetic
b =
-3
and I want it to appear in command window like this
b =
-3
Please help me.
  1 件のコメント
Rik
Rik 2022 年 9 月 22 日
You can see the available options on the documentation page of the format command. What you want is not possible with documented tools.
What you could do is use code like Davide suggested below. It might also be possible to write a wrapper class and overload functions like disp (although I'm not sure which function is actually called when printing a result to the command window).

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

回答 (1 件)

Davide Masiello
Davide Masiello 2022 年 9 月 22 日
I do not know you can change the way the editor looks, but you can print the result so that it looks the way you want.
b = -3;
fprintf('b =\n%d',b)
b = -3

カテゴリ

Help Center および File ExchangeGet Started with MATLAB についてさらに検索

タグ

製品


リリース

R2022b

Community Treasure Hunt

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

Start Hunting!

Translated by