Compactly display a matrix
15 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
If we wish to display a matrix using the command 'disp' in a compact manner, I know we can use "format compact" to minimize vertical space wastage in the command window.
Similarly, if we wish to reduce the horizontal space between the columns of a matrix while displaying it using 'disp', is there a simple way already available in Matlab?
I know we can use the printf commands along with carefully constructed formatting strings, but if I just need to reduce the horizontal space between the columns, is there a simple way?
Thanks!
0 comentarios
Respuestas (2)
Matt Fig
el 12 de Abr. de 2011
For this kind of thing I wrote my own custom display function, which uses the FPRINTF command for the formatting. I don't know of any other way to reduce horizontal spacing.
0 comentarios
Ver también
Categorías
Más información sobre Desktop 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!