matlab的GUI按钮代码
DEMO
环境依赖
MATLAB1016a
部署步骤
加入工作目录
运行myClock.m
目录结构描述
关键代码
%
---
方法一的计时启动按钮.
function
pushbutton1_Callback(hObject,
eventdata,
handles)
%
hObject
handle
to
pushbutton1
(see
GCBO)
%
eventdata
reserved
-
to
be
defined
in
a
future
version
of
MATLAB
%
handles
structure
with
handles
and
user
data
(see
GUIDATA)
%
获取输入值
a=str2num(get(handles.edit1,'string'));
b=str2num(get(handles.edit2,'string'));
c=str2num(get(handles.edit3,'string'));
mytime=[a;b;c]
Alltime=mytime(1)*60*60+mytime(2)*60
2022-06-22 11:55:38
132KB
系统开源
1