Get rid of unnecessary space in output of full(A)
3 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Bo Bramer
el 2 de Dic. de 2020
Comentada: Bo Bramer
el 2 de Dic. de 2020
How do I get rid of the unecessary space while also not using scientific notation? When using
format short
full(A) % A is a 14x14 matrix
it displays compact like I'd like it to, but is in scientific notation, making it more difficult to read:
But, when I change it to
format shortG
it stops using scientific notation as the numbers are all less than 5 digits long, but it then displays it with a significant amount of unnecessary space:
How do I make it such that the matrix displays in non-scientific notation, like in the second image, but in a compact format, like in the first image?
0 comentarios
Respuesta aceptada
Walter Roberson
el 2 de Dic. de 2020
disp(num2str(full(A)))
You can add a format specifier to num2str() to be more specific about widths.
Más respuestas (0)
Ver también
Categorías
Más información sobre Multidimensional Arrays en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!