MATLAB: Matlab Error: graphic

error

Hi everybody,I was running simulink, but after some second my pc stucked. Then I shutted down the pc brutally. When I opened Matlab, I saw the following warning:
Warning: Initializing MATLAB Graphics failed.
This indicates a potentially serious problem in your MATLAB setup, which should
be resolved as soon as possible. Error detected was:
MATLAB:load:unableToReadMatFile
Unable to read MAT-file
C:\Users\cecch\AppData\Roaming\MathWorks\MATLAB\R2017a\matlabprefs.mat. File
might be corrupt.
> In hgrc (line 163)
In initprefs (line 11)
In matlabrc (line 137)
What should I do?

Best Answer

I recommend deleting C:\Users\cecch\AppData\Roaming\MathWorks\MATLAB\R2017a\matlabprefs.mat . After that you will need to go in and reconfigure any preferences you had changed, such as how things dock, or hot-keys, or which warning messages you want the automatic syntax checker to look for.
Related Question