How to see aligned results on command window?
Afficher commentaires plus anciens
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 commentaires
Stephen23
le 22 Mai 2023
Aligning columns is easist using a monospaced font.
You appear to be using a proprtional font. Is that intentional?
Mathieu NOE
le 22 Mai 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
le 22 Mai 2023
Mathieu NOE
le 23 Mai 2023
my pleasure !
Réponses (0)
Catégories
En savoir plus sur Spreadsheets dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!