该楼层疑似违规已被系统折叠隐藏此楼查看此楼
functionvarargout=jisuanqi(varargin)
gui_Singleton=1;
gui_State=struct('gui_Name',mfilename,...
'gui_Singleton',gui_Singleton,...
'gui_OpeningFcn',@jisuanqi_OpeningFcn,...
'gui_OutputFcn',@jisuanqi_OutputFcn,...
'gui_LayoutFcn',[],...
'gui_Callback',[]);
ifnargin&&ischar(varargin{1})
gui_State.gui_Callback=str2func(varargin{1});
end
ifnargout
[varargout{1:nargout}]=gui_mainfcn(gui_State,varargin{:});
else
gui_mainfcn(gui_State,varargin{:});
end
functionjisuanqi_OpeningFcn(hObject,eventdata,handles,varargin)
globalxweisuanfudiandian_ichucunpanduanm
m=0;
panduan=0;
chucun=0;
dian_i=0;
dian=0;
suanfu=0;
wei=0;
x=0;
handles.output=hObject;
guidata(hObject,handles);
functionvarargout=jisuanqi_OutputFcn(hObject,eventdata,handles)
varargout{1}=handles.output;
functionyi_Callback(hObject,eventdata,handles)
y=1;
globalxweidiandian_ipanduan
ifdian==0
ifwei==1
x=x*10+y;
elsewei==0
x=y;
end
elsedian==1
x=x+y/10^dian_i;
dian_i=dian_i+1;
end
wei=1;
panduan=0;
set(handles.xianshi,'string',x)
functionba_Callback(hObject,eventdata,handles)
y=8;
globalxweidiandian_ipanduan
ifdian==0
ifwei==1
x=x*10+y;
elsewei==0
x=y;
end
elsedian==1
x=x+y/10^dian_i;
dian_i=dian_i+1;
end
wei=1;
panduan=0;
set(handles.xianshi,'string',x)
functionqi_Callback(hObject,eventdata,handles)
y=7;
globalxweidiandian_ipanduan
ifdian==0
ifwei==1
x=x*10+y;
elsewei==0
x=y;
end
elsedian==1
x=x+y/10^dian_i;
dian_i=dian_i+1;
end
wei=1;panduan=0;
set(handles.xianshi,'string',x)
functionliu_Callback(hObject,eventdata,handles)
y=6;
globalxweidiandian_ipanduan
ifdian==0
ifwei==1
x=x*10+y;
elsewei==0
x=y;
end
elsedian==1
x=x+y/10^dian_i;
dian_i=dian_i+1;
end
wei=1;
panduan=0;
set(handles.xianshi,'string',x)
functionwu_Callback(hObject,eventdata,handles)
y=5;
globalxweidiandian_ipanduan
ifdian==0
ifwei==1
x=x*10+y;
elsewei==0
x=y;
end
elsedian==1
x=x+y/10^dian_i;
dian_i=dian_i+1;
end
wei=1;
panduan=0;
set(handles.xianshi,'string',x)
functionsi_Callback(hObject,eventdata,handles)
y=4;
globalxweidiandian_ipanduan
ifdian==0
ifwei==1
x=x*10+y;
elsewei==0
x=y;
end
elsedian==1
x=x+y/10^dian_i;
dian_i=dian_i+1;
end
wei=1;
panduan=0;
set(handles.xianshi,'string',x)
functionsan_Callback(hObject,eventdata,handles)
y=3;
globalxweidiandian_ipanduan
ifdian==0
ifwei==1
x=x*10+y;
elsewei==0
x=y;
end
elsedian==1
x=x+y/10^dian_i;
dian_i=dian_i+1;
end
wei=1;
panduan=0;
set(handles.xianshi,'string',x)
functioner_Callback(hObject,eventdata,handles)
y=2;
globalxweidiandian_ipanduan
ifdian==0
ifwei==1
x=x*10+y;
elsewei==0
x=y;
end
elsedian==1
x=x+y/10^dian_i;
dian_i=dian_i+1;
end
wei=1;
panduan=0;
set(handles.xianshi,'string',x)
functionjiu_Callback(hObject,eventdata,handles)
y=9;
globalxweidiandian_ipanduan
如果觉得《matlab gui编写计算器 怎样用MATLAB中的GUI做一个简单计算器》对你有帮助,请点赞、收藏,并留下你的观点哦!