Is there a way to turn off the command window's autoscroll during a function's execution

40 views (last 30 days)
Andrew Diamond
Andrew Diamond on 19 Jan 2018
Answered: Andrew Diamond on 5 Jul 2018
I'm running 2017b. I can't just pause because I have a PCT app running in a parfor loop and so, I think, that's why the Pause button doesn't show. I want to look back up the command window to see something printed out earlier but the running function is spewing stuff to the command window constantly so I can't scroll back through the command window without it autoscrolling back in about a second. That's unworkable.
  3 Comments
Walter Roberson
Walter Roberson on 19 Jan 2018
There have certainly been times when I wanted some output to pause long enough for me to read it but I was stymied because the program was producing output that was triggering autoscroll.

Sign in to comment.

Answers (2)

Steven Lord
Steven Lord on 19 Jan 2018
Do you need to view the displayed text while the application is running, or is the problem you're trying to solve the fact that you can't scroll the screen buffer back far enough to see that text by the end of the application's run (because it wrote too much text in the Command Window?)
In the latter case, you can start MATLAB with the -logfile option, use the diary function to write the displayed information to a file, or create a function named something like writeToLog that uses low-level file I/O functions to write the information to a log file in a format of your choice rather than displaying everyting in the Command Window.
  3 Comments

Sign in to comment.


Community Treasure Hunt

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

Start Hunting!