how to use timer function to display a button after a 5sec?
古いコメントを表示
i have already view from the matlab central but i don't get the mean to use timer. anyone help?
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)
t = timer('TimerFcn',@(x,y)pushbutton2, 'Period', 5.0);<---------------prob
% --- Executes on button press in pushbutton2.
function pushbutton2_Callback(hObject, eventdata, handles)
% hObject handle to pushbutton2 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
display ();
is it the the way to use on it?
[EDITED, code formatted, Jan S]
1 件のコメント
Daniel Shub
2012 年 4 月 27 日
http://www.mathworks.com/matlabcentral/answers/6200-tutorial-how-to-ask-a-question-on-answers-and-get-a-fast-answer
回答 (1 件)
Jan
2012 年 4 月 27 日
0 投票
See "help timer" and "doc timer".
Please explain the occuring problem with any details. "prob" does not reveal, what you want to achieve.
5 件のコメント
CF
2012 年 4 月 27 日
Daniel Shub
2012 年 4 月 27 日
Have you started the timer?
CF
2012 年 4 月 27 日
Jan
2012 年 4 月 27 日
Use: start(t1)
Did you read "doc timer" already?
CF
2012 年 4 月 27 日
カテゴリ
ヘルプ センター および File Exchange で Startup and Shutdown についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!