GUI Startup Problem "guide"

조회 수: 5 (최근 30일)
alo sabaar
alo sabaar 2016년 2월 7일
답변: prabhat kumar sharma 2025년 1월 10일
Hi everyone,
I have a problem on startup with GUI. I was encountered by the following message after type "guide"
>> guide
Error: File: guidefunc.m Line: 172 Column: 1
Function definitions are not permitted in this context.
Error in guide (line 133)
result = LayoutEditor.openLayoutEditor(filename);
Error in guidetemplate/processDialogResult (line 184)
guide(destfigfile);
Error in guidetemplate/dialogCallback (line 103)
processDialogResult(quickstartpanel);
com.mathworks.jmi.MatlabException: Error: File: guidefunc.m Line: 172 Column: 1
Function definitions are not permitted in this context.
at com.mathworks.jmi.NativeMatlab.SendMatlabMessage(Native Method)
at com.mathworks.jmi.NativeMatlab.sendMatlabMessage(NativeMatlab.java:266)
at com.mathworks.jmi.MatlabLooper.sendMatlabMessage(MatlabLooper.java:120)
at com.mathworks.jmi.Matlab.mtFevalConsoleOutput(Matlab.java:1690)
at com.mathworks.jmi.MatlabWorker.feval(MatlabWorker.java:195)
at com.mathworks.jmi.MatlabWorker.feval(MatlabWorker.java:172)
at com.mathworks.toolbox.matlab.guide.utils.LayoutWorker.runOnMatlabThread(LayoutWorker.java:51)
at com.mathworks.jmi.MatlabWorker$2.run(MatlabWorker.java:79)
at com.mathworks.jmi.MatlabWorker.start(MatlabWorker.java:248)
at com.mathworks.toolbox.matlab.guide.utils.LayoutWorker.start(LayoutWorker.java:70)
at com.mathworks.toolbox.matlab.guide.utils.LayoutWorker.fevalConsoleOutput(LayoutWorker.java:41)
at com.mathworks.toolbox.matlab.guide.LayoutLooper.readFigure(LayoutLooper.java:711)
at com.mathworks.toolbox.matlab.guide.LayoutEditor.openLayoutEditor(LayoutEditor.java:2014)
at com.mathworks.toolbox.matlab.guide.LayoutEditor.openLayoutEditor(LayoutEditor.java:1977)
Thanks for the future help and answer.

답변 (1개)

prabhat kumar sharma
prabhat kumar sharma 2025년 1월 10일
Hello Alo,
It looks like there is some issue with your guidefunc.m file.
Here are few things you can try to fix this.
  • If the file has been modified, restore it to its original state. You can do this by reinstalling MATLAB or by restoring the file from a backup if you have one.
  • try to upgrade matlab to a newer version.
  • If the issue persists, consider reinstalling the GUIDE components. This can be done through the MATLAB installer by selecting the "Add-Ons" or "Modify" option, depending on your MATLAB version.
  • Make sure your MATLAB path is set correctly. Sometimes, custom paths can interfere with built-in functions. Use the restoredefaultpath command to reset your path to the default and see if that resolves the issue:
restoredefaultpath;
rehash toolboxcache;
savepath;
  • If none of the above steps work, consider reaching out to MathWorks support. They can provide more detailed assistance and might have additional insights based on your specific MATLAB version and setup.
I hope it helps!

카테고리

Help CenterFile Exchange에서 Startup and Shutdown에 대해 자세히 알아보기

태그

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by