matlab中gui文件出错
Errorin==>guimyself1>edit2_Callbackat113if(isempty(input))Errorin==>gui_mainfcnat75fe...
Error in ==> guimyself1>edit2_Callback at 113
if(isempty(input))
Error in ==> gui_mainfcn at 75
feval(varargin{:});
Error in ==> guimyself1 at 42
gui_mainfcn(gui_State, varargin{:});
??? Error while evaluating uicontrol Callback.
c =
7.5
>>
113 str2num(get(hObject,'String')); %把字符串转换为数字
114 if(isempty(input))
115 set(hObject,'String','0')
116 end
117 guidata(hObject,handles);
70~82句
if gui_Create == 0
varargin{1} = gui_State.gui_Callback;
if nargout
[varargout{1:nargout}] = feval(varargin{:});
else
feval(varargin{:}); %feval是[y1,..,yn] = FEVAL(F,x1,...,xn) F是需要使用函数的函数名,或者句柄;xi是函数的参数,yi是函数的返回值
end
else
if gui_State.gui_Singleton
gui_SingletonOpt = 'reuse';
else
gui_SingletonOpt = 'new';
end
35~43句
if nargin && ischar(varargin{1})
gui_State.gui_Callback = str2func(varargin{1});
end
if nargout
[varargout{1:nargout}] = gui_mainfcn(gui_State, varargin{:});
else
gui_mainfcn(gui_State, varargin{:});
end 展开
if(isempty(input))
Error in ==> gui_mainfcn at 75
feval(varargin{:});
Error in ==> guimyself1 at 42
gui_mainfcn(gui_State, varargin{:});
??? Error while evaluating uicontrol Callback.
c =
7.5
>>
113 str2num(get(hObject,'String')); %把字符串转换为数字
114 if(isempty(input))
115 set(hObject,'String','0')
116 end
117 guidata(hObject,handles);
70~82句
if gui_Create == 0
varargin{1} = gui_State.gui_Callback;
if nargout
[varargout{1:nargout}] = feval(varargin{:});
else
feval(varargin{:}); %feval是[y1,..,yn] = FEVAL(F,x1,...,xn) F是需要使用函数的函数名,或者句柄;xi是函数的参数,yi是函数的返回值
end
else
if gui_State.gui_Singleton
gui_SingletonOpt = 'reuse';
else
gui_SingletonOpt = 'new';
end
35~43句
if nargin && ischar(varargin{1})
gui_State.gui_Callback = str2func(varargin{1});
end
if nargout
[varargout{1:nargout}] = gui_mainfcn(gui_State, varargin{:});
else
gui_mainfcn(gui_State, varargin{:});
end 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询