필터 지우기
필터 지우기

1.0e+02 *

조회 수: 32 (최근 30일)
Sergey Dukman
Sergey Dukman 2015년 5월 9일
댓글: Star Strider 2015년 5월 9일
Hei!
Can somebody help me with this:
After running for-loop (for example, for I=1:10 [I, I^2, sqrt(I)] end) I getting following answer as
ans =
1.0e+02 *
0.100000000000000 1.000000000000000 0.031622776601684
But it should be as follows
ans =
10.0000 100.0000 3.1623
Is it something with my Matlab settings?
I use format long.

채택된 답변

Star Strider
Star Strider 2015년 5월 9일
In MATLAB Preferences (the ‘gear’ icon in the top toolbar) you can set format to ‘short g’. You can also do so from the Command Window by simply typing:
format short g
That should give you the result you want, although no promises with matrices.
  댓글 수: 2
Sergey Dukman
Sergey Dukman 2015년 5월 9일
Thank you Sir,
It works just fine!
Star Strider
Star Strider 2015년 5월 9일
My pleasure!

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

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Interactive Control and Callbacks에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by