MATLAB Suddenly Stopped Being Able to Plot
이전 댓글 표시
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
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
2025년 8월 12일
Torsten
2025년 8월 12일
I think only support can help in your case.
Caniggia
2025년 8월 12일
Gilberto Pin
2025년 8월 22일
편집: Gilberto Pin
2025년 8월 22일
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
답변 (3개)
Star Strider
2025년 8월 12일
0 개 추천
First, see if the path got corrupted.
Run these:
restoredefaultpath
rehash toolboxcache
from a script or your Command Window, then try plotting again.
댓글 수: 4
Caniggia
2025년 8월 12일
Star Strider
2025년 8월 12일
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
2025년 8월 23일
Dave
2025년 8월 23일
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
2025년 8월 23일
0 개 추천
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
2025년 9월 11일
0 개 추천
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!!
카테고리
도움말 센터 및 File Exchange에서 Startup and Shutdown에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!