MATLAB Answers


text not refreshed when scrolling in command window and editor

Asked by saeedafra on 3 Apr 2016
Latest activity Edited by Theodore Golfinopoulos on 21 Dec 2018
I have a student version of MATLAB 2013a on OSX El Captain. Sometimes when I'm scrolling in command window or editor window, the text isn't displayed correctly, it's like a problem with refreshing the page. Any idea what's the problem? I end up scrolling up and down until it's all okay. I don't really know how to describe it.


I have the same problem with Matlab R2018a in Ubuntu 18.04. Don't know how to solve it.
I have also experienced this problem - the picture below is from a Matlab 2017a instance on an Ubuntu 16.04 installation. I've seen it on Matlab2016, also on Ubuntu 16.04. Matlab 2015b doesn't seem to have the problem.
See also
That question has a little more documentation of the problem (with pictures).
Here is the same phenomenon in Matlab 2015b running on Ubuntu 18.04 with 3.0 Mesa 18.05 OpenGL.
And here, on Matlab 2017a running on Ubuntu 18 with software OpenGL.

Sign in to comment.


1 Answer

Answer by Theodore Golfinopoulos on 21 Dec 2018
Edited by Theodore Golfinopoulos on 21 Dec 2018

See this bug fix
It seems to be a Java issue. A temporary fix is the clearscreen command; a more permanent fix is pointing a MATLAB_JAVA environment variable to your system's jre. Details below.
The clearscreen command
ends the glitch temporarily, but it will come back; to get rid of the problem, export a MATLAB_JAVA environment variable in your .bashrc and point it to the Java runtime environment on your system - for me, this looked like
export MATLAB_JAVA=/usr/lib/jvm/java-8-openjdk-amd64/jre
The test code mentioned here
for i=1:1000,'x',drawnow('update'),pause(0.0001),end
works to figure out (a) whether you have this issue (i.e. it reproduces the problem), and (b) whether you've fixed it.
What a relief!


Sign in to comment.