필터 지우기
필터 지우기

Formatting output to not use scientific notation

조회 수: 16 (최근 30일)
Nicholas Dalton
Nicholas Dalton 2023년 6월 9일
답변: Walter Roberson 2023년 6월 9일
Is there a built in method that formats the output of a matrix to not automatically use scientific notation? Even though I've used format long, it still automatically decides to use scientific notation regardless. See the image.
What makes this annoying is that when I output the data matrix, the matrix has more than 100 rows. So I don't see that "1.0e+04" at the top and I think the data/math is wrong until I scroll up.

채택된 답변

Walter Roberson
Walter Roberson 2023년 6월 9일
format long g
exp(randn(3,4)*1e2)
ans = 3×4
1.0e+00 * 0.0186992231531476 1.8893425575598e-65 1.88236817978742e+16 4.43854980842831e+32 5.89085438558245e-52 6.0223434774094e-77 5.47325034899873e-51 1.41640379765262e+54 77720731216387.2 9076419.39710539 1.93799551856927e+20 4.95573805245596e-35

추가 답변 (0개)

태그

Community Treasure Hunt

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

Start Hunting!

Translated by