MATLAB Answers

Display output in the center of the screen

7 views (last 30 days)
Katrina Anjela Alim
Katrina Anjela Alim on 3 Jul 2020
Answered: Image Analyst on 3 Jul 2020
Hello everyone! I am trying to program a switch case and I want to display the output in the center screen of the command window, but I don't know how. Can someone teach me?

Answers (1)

Image Analyst
Image Analyst on 3 Jul 2020
I don't know because the command window width changes depending on how you have it sized. This might be a question for Yair Altman at UndocumentedMatlab
But you can certainly move things over if you use fprintf() to display output rather than just leaving off the semicolon. With fprintf() you have complete control on how to display things (variables and text).

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by