Get rid of unnecessary space in output of full(A)
3 次查看(过去 30 天)
显示 更早的评论
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 个评论
采纳的回答
Walter Roberson
2020-12-2
disp(num2str(full(A)))
You can add a format specifier to num2str() to be more specific about widths.
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Multidimensional Arrays 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!