Question: how to use uiwait in matlab?
Answer: Use the uiwait function with a modal dialog box to block program execution and restrict user interaction to only the dialog box until the user responds to it. uiwait( f , timeout ) blocks execution until uiresume is called, the figure is deleted, or timeout seconds elapse.