MatLab figure date and time static text
古いコメントを表示
checkbox1's callback for date and time:
m=1;
while m==1
m=get(hObject,'value');
txt=datestr(now);
set(handles.datetime,'string',txt);
pause(1);
end
can you please help me to remove the checkbox that if I will push the RUN button the datetime static text will automatically call the date and time.
5 件のコメント
Jan
2013 年 10 月 8 日
I do not understand the question. Which checkbox do you want to remove? Does "remove" mean deleting in the GUI, unchecking in the GUI or removing the code from the FIG file or the Matlab code? There is no "RUN" button in teh shown code. What does "call the date and time" mean?
A TIMER is much smarter than a blocking loop, when you want to update a clock display.
Lloyd
2013 年 10 月 8 日
Jan
2013 年 10 月 8 日
I do not know a "compile button". What do you mean by "figure file"?
I do not understand any sentence currently.
Lloyd
2013 年 10 月 8 日
Walter Roberson
2013 年 10 月 8 日
I think GUIDE is being referred to. And that Lloyd wants the time display to start going as soon as the GUI is launched instead of only after a button is clicked.
採用された回答
その他の回答 (0 件)
カテゴリ
ヘルプ センター および File Exchange で Startup and Shutdown についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!