Reputation: 1135
I am running a program, in the end I ran a GUI that writes responses to an Excel file. In the contium of the program I try to read these files. It seem to me that MATLAB tries to read before the files are created by the GUI.
How can I tell the program to wait until the GUI is finished (button is pressed)?
Something like:
>>Run_Gui()
>>WaitSomeh ow()
>>xlsread(...)
Upvotes: 2
Views: 5802
Reputation: 20915
If you want to wait until a figure is closed, try using
f = figure();
uiwait(f);
As @stefangretar suggested correctly, you can use
uiresume(f)
If you don't want to destroy the window.
Upvotes: 4