Clear Filters
Clear Filters

Setting Delays and Opening new Form, Closing old forms in GUI

3 views (last 30 days)
Hi all
Is there a way to create a delay (example: 3sec) for a button after pressed in GUI1?
Also, how should I open a new form (GUI2) and close the GUI1 from previous with a button?

Accepted Answer

Wouter on 20 Mar 2013
Edited: Wouter on 20 Mar 2013
you can set a 3 second delay by (this does pause matlab entirely though):
you can open a new gui using:
where GuiFunction is the function name of GUI2
You can close a current gui using:
where figure1 is the label of the current figure window (belonging to gui1).
William on 20 Mar 2013
hi Wouter
for open a new gui, what do you mean by input1,input2,etc...?
because, let's say i have a simple plain GUI1, with a pushbutton (Next) for which it will close GUI1 and open GUI2 with a delay of 3 sec.
William on 20 Mar 2013
haha ok i have just tried and found out that input1 and input2 and etc is not needed for me thus i leave it () empty instead to open new form gui2. once again thanks a lot for the tips!!!

Sign in to comment.

More Answers (0)


Find more on Migrate GUIDE Apps in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!