MATLAB Suddenly Stopped Being Able to Plot
Ältere Kommentare anzeigen
Initially, Matlab worked properly. Yesterday, I was midway through a for loop where I executed plotting functions and used drawnow. The code executed well 115 times, then, I noted it was taking too long. Using CTRL + C, I killed the program and tried to run again. It didn't run. I restarted matlab and restarted my PC and I couldn't run even once.
With some debugging, I noticed that any graphical functions don't run at all. I tired simple code, such as
figure();
or
plot([0,0],[0,1]);
and none of this runs. It starts executing (shows busy), but never finishes and never shows a plot/figure.
When I eventually kill the process by typing "ctrl+c" it gives me the following message: "Warning: Update encountered failures.". It seems that the plot runs, but doesn't display anything. Eventually, it tries to update something, but I don't know what. I know it's updating after it runs, because if I ran
tic; plot([0,0],[0,1]); toc;
I get a time and only after it gets stuck.
I tried deleting my entire installation, which I believe removes the directories, and reinstalling MATLAB. The problem persists.
5 Kommentare
What do you get as output if you type
which -all plot.m
? Is there a function you created and that shadows the MATLAB plot function ? Then rename it.
If not, you should consult MATLAB Technical Support:
Caniggia
am 12 Aug. 2025
Torsten
am 12 Aug. 2025
I think only support can help in your case.
Caniggia
am 12 Aug. 2025
Gilberto Pin
am 22 Aug. 2025
Bearbeitet: Gilberto Pin
am 22 Aug. 2025
The same occurred to me on R2025a: it suddenly stopped to plot figures and hangs after any call to figure() and plot(...). Moreover, I get this warning after Ctrl+C: "Warning: Update encountered failures. ".
Simultaneously, also parallel computing toolbox is no more able to delete jobs and hangs indefitely, until Ctrl+C. Afer that, the same warning is displayed on command line: "Warning: Update encountered failures. "
BTW: no improvements after running: restoredefaultpath and rehash toolboxcache
Antworten (3)
Star Strider
am 12 Aug. 2025
0 Stimmen
First, see if the path got corrupted.
Run these:
restoredefaultpath
rehash toolboxcache
from a script or your Command Window, then try plotting again.
4 Kommentare
Caniggia
am 12 Aug. 2025
Star Strider
am 12 Aug. 2025
My pleasure!
I am not certain what you did with respect to 'deleting the entire installation'. Simply uninstalling and reinstalling usually works. There are some other directories that may need to be manually deleted, however that is usually not necessary.
Please post the reply that MathWorks sends since that would be of interest to others with the same problem.
Caniggia
am 23 Aug. 2025
Dave
am 23 Aug. 2025
Yes, the same for me! I will say that I was able to diagnose this problem in about 15 minutes with the help of ChatGPT 5. The LLM gave me a list of things to try. Checking the startup script was #5 on the list and it was the right one. The LLM claims its because while the desktop is still initializing (and perhaps the graphics part isn't initialized yet), the startup is run. Those functions (and maybe one or two more I had in my startup) created a race condition that then hung the application.
Dave
am 23 Aug. 2025
0 Stimmen
I encountered this exact problem. It turns out that I had functions in my "startup.m" that tried to change the behavior of the graphics engine that no longer work (possibly trying to use fonts that are no longer available on my Mac????). If you have a "startup.m" file, temporarily move it to "startup_OLD.m" or some such and see if you get the ability to plot again.
William
am 11 Sep. 2025
0 Stimmen
I had the same problem and it was solved when i restarted r2025 and waited patiently for it to intialize before running any scripts. Seems to have been cause by running scripts before R2025 was ready. Thank you!!
Kategorien
Mehr zu Startup and Shutdown finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!