How to reduce the space among columns in command window?

15 ビュー (過去 30 日間)
Xiaohan Du
Xiaohan Du 2016 年 12 月 22 日
コメント済み: Xiaohan Du 2016 年 12 月 23 日
Hi all,
I'd like to display a 31 by 31 matrix in command window, MATLAB leaves a lot of space among columns like this:
290 130 4 -80 -164 172 256 46 -38 -122
I'd like to reduce the space among these scalars, for instance, like this:
290 130 4 -80 -164 172 256 46 -38 -122
So I can directly see the pattern of the matrix by displaying it within one screen. How can I do this?
Many thanks!

採用された回答

Walter Roberson
Walter Roberson 2016 年 12 月 22 日
Unfortunately there is no format setting for that.
For row vectors, I sometimes use mat2str() to get a more compact version.
  1 件のコメント
Xiaohan Du
Xiaohan Du 2016 年 12 月 23 日
Hi Walter,
There is no official way to do it but I found this:
which works as a function.

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

その他の回答 (0 件)

カテゴリ

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

Community Treasure Hunt

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

Start Hunting!

Translated by