Is there an alternative function for uiwait() in a MATLAB GUI?

I am currently working to modify code for a GUI that was written back in 2009 by another researcher. For this GUI we are streaming data from a motion tracking system. In order to allow for the user to see what is going on with the GUI the previous researcher was using the function uiwait(gcf,timeout), where timeout was the time that the GUI paused before continuing. This allowed the data to continuously stream, but not so fast that the user couldn't see what was going on.
This GUI was originally written in an older version of MATLAB in which you can input any amount of time for timeout. In the newer versions of MATLAB timeout cannot be less than 1 second. If it is less than 1 second then MATLAB just defaults it to 1 second. However, by doing this it makes the GUI run extremely slow to the point where it is useless.
In order to overcome this problem I attempted to replace uiwait(gcf,timeout) with just a simple user-written timeout function. However, when I do this the GUI does not run properly, implying that uiwait has some functionality beyond just being a timeout function in this code.
So now what I am looking for is a similar function to uiwait; one that has the same functionality, while allowing me to select a time out of less than 1 second. Does anybody know of such a function?
Thanks!

Answers (1)

It sounds like you probably could use a timer to pull the data. Then you won't need uiwait() at all.

Categories

Asked:

on 13 Sep 2012

Community Treasure Hunt

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

Start Hunting!