Borrar filtros
Borrar filtros

Formatting output to not use scientific notation

16 visualizaciones (últimos 30 días)
Nicholas Dalton
Nicholas Dalton el 9 de Jun. de 2023
Respondida: Walter Roberson el 9 de Jun. de 2023
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.

Respuesta aceptada

Walter Roberson
Walter Roberson el 9 de Jun. de 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

Más respuestas (0)

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by