How to see aligned results on command window?
Show older comments
After running a code, results appear in a matrix form. The results are correct however reading them is a little tedious as the numbers in columns of matrix are not aligned.
Kindly, have a look at the screenshot.I am using MATLAB Version: 9.8.0.1323502 (R2020a).

4 Comments
Stephen23
on 22 May 2023
Aligning columns is easist using a monospaced font.
You appear to be using a proprtional font. Is that intentional?
Mathieu NOE
on 22 May 2023
yeap , solution # 1 is using monospaced font
alternative 1 : see : How to properly align output text in command window? - MATLAB Answers - MATLAB Central (mathworks.com)
alternative 2 : use some functions that have been created to get a nicer table looking display :
* look at prin that belongs to this excellent package : plt - File Exchange - MATLAB Central (mathworks.com)
* and print_table in attachment (zip)
some demos are in the zip attached
Sania Nizamani
on 22 May 2023
Mathieu NOE
on 23 May 2023
my pleasure !
Answers (0)
Categories
Find more on Spreadsheets in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!