Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Disable auto-scrolling in command window

Tags:

scroll

matlab

A lot of the code that I write in Matlab has a very verbose output. As the program runs, information is printed to the command window, and with each new line, the window automatically scrolls to the bottom. This becomes a problem when I want to read some of the output more closely or scroll up to look at older output. I can scroll up, but only until a new line is printed, which is often less than a second.

Does anyone know if it is possible to turn off this automatic scrolling in the Matlab window? I work in a number of different Matlab versions, depending on the machine, and this happens with all of them. The answer to this might be "No", but I swear I remember having this functionality at one point.

like image 238
David K Avatar asked Jul 25 '13 17:07

David K


People also ask

How do I stop terminal scrolling?

Luckily you can disable this behavior: Gnome terminal: *Edit -> Profile preferences -> Scrolling", uncheck Scroll on output. Terminator: Right click on terminal screen, Preferences -> Profile -> (for each profile) -> Scrolling, uncheck Scroll on output.

How do I stop my page from scrolling by itself?

Change Mouse Settings Step 1: Press Win + I at the same time to open the Windows Settings interface. Step 2: Navigate to Devices > Mouse. Step 3: Disable the option of Scroll inactive windows when I hover over them. Then, see if the issue of Windows 10 uncontrollable scrolling is fixed.


2 Answers

Use the more function: http://www.mathworks.com/help/matlab/ref/more.html

more on

Then run your program. Press spacebar when you wish to see more of the output.

more off will turn it off.

like image 177
Dan455 Avatar answered Oct 11 '22 03:10

Dan455


You may find this workaround useful.

First launch matlab using the command line matlab -logfile 'myLog.txt' (the doc says it "starts MATLAB and makes a copy of any output to the Command Window in filename. This includes all crash reports.")

Then open your .txt file using a text editor supporting automatic refresh of content (see picture). On OSX I use TextWrangler (freely available at www) but others have been reported to have this feature (see here or here).

Results: output displays (fprintf, disp, but not the commands per se) are printed both on the Matlab console and the text editor (file is refreshed with a little lag time, below half a second I would say with my configuration). And there is no automatic scrolling. Such procedure does not seem to impact the overall performance of the script (although it may deserve some testing).

enter image description here

like image 38
marsei Avatar answered Oct 11 '22 03:10

marsei