MATLAB: Using uiimport and subsequent coded commands

uiimport

Hi guys –
I call uiimport in a GUI to import data, and in the GUI after that call I have some commands that operate on data that is imported. The problem I'm having is that in order to complete the data import using uiimport one has to click the "finish" button in the uiimport window, and before I can do this my code has moved on and attempted to execute operations on variables whose import is not complete. I need to make my code wait until the uiimport action is complete before moving on. Any thoughts?

Best Answer

Hi Jason,
In order for your code to wait until uiimport has finished, make sure you request a return value from uiimport.
S = uiimport;
a = 2;
'a' will not be created until the user has finished importing.
Related Question