I want to create a timer function that will replace the pause function. I have a GUI that is controlling the operation of another program. I send commands to the other program, then need to wait a few seconds before sending the next command, then need to wait a few seconds in between polling the status. I'm currently using pause(5), but would like to use a timer instead so that I can still use the command window while the GUI is waiting. I couldn't find an example of how to set up a singleshot timer that replaces the pause function.
Here's an example of what my code looks like (with pseudocode for the functions that interact with the other program):
while strcmp('running',sendcmd('check status'))
How can I write a timer function/object that will replace pause(pausedur)? Unless I'm just misunderstanding timers, this seems like an example that should be included in the MATLAB help documentation.