How to make my window close on a timer

4 Ansichten (letzte 30 Tage)
Rainaire Hansford
Rainaire Hansford am 27 Aug. 2014
Kommentiert: Asit Kumar am 4 Jul. 2018
does any one known how to make a timer so that it closes the window that im using? Im trying to make a window pop up in GUI stay for like 20 seconds then close on its own. Please help
  1 Kommentar
Geoff Hayes
Geoff Hayes am 27 Aug. 2014
Rainaire - what kind of window are you popping up? Another GUI or some kind of dialog?

Melden Sie sich an, um zu kommentieren.

Antworten (1)

Bruno Pop-Stefanov
Bruno Pop-Stefanov am 29 Aug. 2014
>> f = figure;
>> t = timer('ExecutionMode','singleShot','StartDelay',20,'TimerFcn',@(~,~)close(f));
>> start(t)
  5 Kommentare
Jan
Jan am 4 Jul. 2018
@Asit Kumar: You mean a window, which does not belong to Matlab? This is new question, so please open a new thread.

Melden Sie sich an, um zu kommentieren.

Kategorien

Mehr zu Interactive Control and Callbacks finden Sie in Help Center und File Exchange

Tags

Produkte

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by