Error is showing: "Error using plot: Unrecognized function or variable 'matlab.graphics.chart.internal.inputparsinutils.prepareAxes'"
이전 댓글 표시
I have installed MATLAB R2025b last week, and could not open Simulink, receiving the error that it cannot find "MATLAB/R2025b/toolbox/matlab/graphics/core/hg/hgrc.m". I have therefore added the path for that function to the path, and now suddenly, the function "plot" (outside of simulink) does not work anymore, giving the following errors:
Unrecognized function or variable 'matlab.graphics.internal.initialize'
and
Unrecognized function or variable 'matlab.graphics.chart.internal.inputparsingutils.prepareAxes'
In any case, the added path is not in the path anymore after restarting MATLAB. So this cannot actually be the reason.
How can I solve this problem?
Thanks for your help!
댓글 수: 2
dpb
2026년 3월 19일 16:31
Contact Mathworks at <Product Support Page>. They support install and startup issues. Something went wrong initially or the default path wouldn't have needed munging on...
I have therefore added the path for that function to the path
Can you show the exact command you used to add the folder to the path, and any text (particularly text in orange) that the command displayed when you ran it? Perhaps that command inadvertently removed a folder from the path.
That folder ought to have been on the MATLAB path anyway, so you shouldn't have needed to add it. You can see that in MATLAB Online it is on the path (I haven't done any other path manipulation in this comment.)
P = split(path, pathsep);
hgdir = fullfile('toolbox','matlab','graphics','core','hg');
isItOnThePath = P(contains(P, hgdir))
When I run the command in a freshly started session of my Windows desktop installation (where again I haven't done any path manipulation) the output is:
isItOnThePath =
{'C:\Program Files\MATLAB\R2025b\toolbox\matlab\graphics\core\hg'}
답변 (1개)
Soumya
대략 12시간 전
Hi Jana,
To help resolve the issue you are experiencing, I recommend trying the following steps:
1. Uninstall and Reinstall MATLAB: Please uninstall MATLAB from your system and then perform a fresh installation. This will ensure that none of the MATLAB files are corrupted and will give you a clean setup.
2. Test Your Workflow: After reinstalling, try running your workflow again to see if the issue persists.
3. Reset MATLAB Path (if needed): If the problem continues, please enter the following commands in the MATLAB command window:
restoredefaultpath
rehash toolboxcache
savepath
I hope these steps will help resolve the issue.
Sincerely,
Soumya
댓글 수: 1
Stephen23
대략 9시간 전
You might as well start with 3 first, before reinstalling.
카테고리
도움말 센터 및 File Exchange에서 Startup and Shutdown에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!