|
"Leon Klein" <AnEinemTagMitLeon@gmx.de> wrote in message <gepgp2$t87$1@fred.mathworks.com>...
> While i was creating a GUI, it happend that i could no longer run it. Now i can only open the GUI's m-File. Could i have done anything wrong inside the code?
>
> When i try to run the m-file i get the following error message:
>
>
> ??? Index exceeds matrix dimensions.
>
> Error in ==> genvarname at 116
> protectedAll = {varnameCell{:},protected{:}};
>
> Error in ==> hgload at 92
> loadthis = genvarname(['hgload', fullpath]);
>
> Error in ==> openfig at 72
> [fig, savedvisible] = hgload(filename, struct('Visible','off'));
>
> Error in ==> gui_mainfcn>local_openfig at 286
> gui_hFigure = openfig(name, singleton, visible);
>
> Error in ==> gui_mainfcn at 159
> gui_hFigure = local_openfig(gui_State.gui_Name, gui_SingletonOpt,
> gui_Visible);
>
> Error in ==> guiAttitudeCalculator at 42
> gui_mainfcn(gui_State, varargin{:});
>
>
>
> When i try to open an the GUI''s matlab figure (file -> open -> select figure) i get the following error message:
>
>
> ??? Index exceeds matrix dimensions.
>
> Error in ==> cellstr at 28
> c{i} = deblank(s(i,:));
>
> Error in ==> errordlg at 47
> ErrorString = cellstr(ErrorStringIn);
>
> Error in ==> uiopen at 216
> errordlg(lasterr);
>
>
>
>
>
> after trying this i even can't open guide (type guide in the command window):
>
>
> ??? Index exceeds matrix dimensions.
>
> Error in ==> dialog at 85
> hDialog = figure('BackingStore' ,backstore , ...
>
> Error in ==> guidetemplate at 25
> hDialog = dialog('Name', title,'visible','off','position',[0, 0, size.width,
> size.height]);
>
> Error in ==> guide at 69
> guidetemplate;
>
> ??? Index exceeds matrix dimensions.
>
> Error in ==> cellstr at 28
> c{i} = deblank(s(i,:));
>
> Error in ==> errordlg at 47
> ErrorString = cellstr(ErrorStringIn);
>
> Error in ==> guidefunc>showErrorDialog at 3781
> h = errordlg(message, title);
>
> Error in ==> guidefunc at 152
> showErrorDialog('Unhandled internal error in guidefunc');
>
> com.mathworks.jmi.MatlabException: Index exceeds matrix dimensions.
> at com.mathworks.jmi.NativeMatlab.SendMatlabMessage(Native Method)
> at com.mathworks.jmi.NativeMatlab.sendMatlabMessage(NativeMatlab.java:211)
> at com.mathworks.jmi.MatlabLooper.sendMatlabMessage(MatlabLooper.java:121)
> at com.mathworks.jmi.Matlab.mtFevalConsoleOutput(Matlab.java:1465)
> at com.mathworks.jmi.MatlabWorker.feval(MatlabWorker.java:182)
> at com.mathworks.jmi.MatlabWorker.feval(MatlabWorker.java:159)
> at com.mathworks.toolbox.matlab.guide.utils.LayoutWorker.runOnMatlabThread(LayoutWorker.java:51)
> at com.mathworks.jmi.MatlabWorker$2.run(MatlabWorker.java:73)
> at com.mathworks.jmi.NativeMatlab.dispatchMTRequests(NativeMatlab.java:352)
Hey Leon,
I was having trouble opening up GUIs that I created in guide as well, and getting all sorts of errors. What I noticed was that I had modified a CreateFcn the *.m file for the GUI so that it would get variables from another GUI (this particular gui that I was trying to open was a sub gui, and I edited the code in the CreateFcn for a popupmenu).
This code, in the CreateFcn was the culprit. I guess when guide was trying to open the *.fig, it reads the *.m file and gets confused when it sees a call in a CreateFcn to another GUI. Anyways, I just commented the code (NOT the entire CreateFcn) and it opened up just fine!
Hope that helps,
Andrzej
|