Change display of matrix entries

조회 수: 3 (최근 30일)
Lou
Lou 2015년 8월 31일
댓글: Stephen23 2015년 8월 31일
Hello, i'd like to change the way matlab presents my output matrix. At the moment it looks like this
M =
1.0e+03 *
0.0070 1.5990 0.0000 0.0520 0.0001 0.0004
0.0070 1.6020 0 0.0550 0 0.0001
0.0070 1.6020 0 0.0550 0 0.0003
How can i avoid the factorization? Thanks in advance!

채택된 답변

the cyclist
the cyclist 2015년 8월 31일
편집: the cyclist 2015년 8월 31일
Try the format command, or use sprintf.
  댓글 수: 3
Walter Roberson
Walter Roberson 2015년 8월 31일
Yes, that is wrong. Use
format long
"short" is for saving space, and one of the ways it saves space is by doing what you referred to as "factorization"
Or possibly you would prefer
format eng
Stephen23
Stephen23 2015년 8월 31일
Or actually read the documentation, which the cyclist gave links to in their answer, which has a table listing all of the format options (together with examples of these). Try some of the options, and find one that suits your needs!

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Numeric Types에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by