Error while using a GUI
조회 수: 1 (최근 30일)
이전 댓글 표시
Hi MATLAB experts,
I've been getting these errors notifications when trying using a toolbox GUI (the m.file is attached):
>> MCMxxxVI_RGBExplorer
Undefined function or variable 'file'.
Error in MCMxxxVI_RGBExplorer>pushbutton1_Callback (line 116)
[pathstr,name,ext]=fileparts(fullfile(pathname,file));
Error in gui_mainfcn (line 95)
feval(varargin{:});
Error in MCMxxxVI_RGBExplorer (line 64)
gui_mainfcn(gui_State, varargin{:});
Error in
matlab.graphics.internal.figfile.FigFile/read>@(hObject,eventdata)MCMxxxVI_RGBExplorer('pushbutton1_Callback',hObject,eventdata,guidata(hObject))
Error while evaluating UIControl Callback.
Would very appreciate any advice,
Tamir
EDIT: Tamir'S "Answer" moved here:
Hi Luna,
The files are attached,
these are the error notifications:
>> MCMxxxVI_RGBExplorer
Undefined function or variable 'file'.
Error in MCMxxxVI_RGBExplorer>pushbutton1_Callback (line 116)
[pathstr,name,ext]=fileparts(fullfile(pathname,file));
Error in gui_mainfcn (line 95)
feval(varargin{:});
Error in MCMxxxVI_RGBExplorer (line 64)
gui_mainfcn(gui_State, varargin{:});
Error in
matlab.graphics.internal.figfile.FigFile/read>@(hObject,eventdata)MCMxxxVI_RGBExplorer('pushbutton1_Callback',hObject,eventdata,guidata(hObject))
Error while evaluating UIControl Callback.
Error using fileparts
Too many output arguments.
Error in MCMxxxVI_RGBExplorer>pushbutton2_Callback (line 130)
[pathstr,name,~,~]=fileparts(fullfile(pathname,file2));
Error in gui_mainfcn (line 95)
feval(varargin{:});
Error in MCMxxxVI_RGBExplorer (line 64)
gui_mainfcn(gui_State, varargin{:});
Error in
matlab.graphics.internal.figfile.FigFile/read>@(hObject,eventdata)MCMxxxVI_RGBExplorer('pushbutton2_Callback',hObject,eventdata,guidata(hObject))
Error while evaluating UIControl Callback.
Error using fileparts
Too many output arguments.
Error in MCMxxxVI_RGBExplorer>pushbutton5_Callback (line 387)
[pathstr,name,ext,versn]=fileparts(get(handles.edit1,'String'));
Error in gui_mainfcn (line 95)
feval(varargin{:});
Error in MCMxxxVI_RGBExplorer (line 64)
gui_mainfcn(gui_State, varargin{:});
Error in
matlab.graphics.internal.figfile.FigFile/read>@(hObject,eventdata)MCMxxxVI_RGBExplorer('pushbutton5_Callback',hObject,eventdata,guidata(hObject))
Error while evaluating UIControl Callback.
채택된 답변
Luna
2019년 5월 17일
Hi Tamir,
Just change line 116 as follows, definetely it will work:
[pathstr,name,ext]=fileparts(fullfile(pathname,file1));
댓글 수: 0
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Migrate GUIDE Apps에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!