Azzera filtri
Azzera filtri

Formatting output to not use scientific notation

15 visualizzazioni (ultimi 30 giorni)
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.

Risposta accettata

Walter Roberson
Walter Roberson il 9 Giu 2023
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

Più risposte (0)

Tag

Community Treasure Hunt

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

Start Hunting!

Translated by