Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations waross on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

Toggle Buttons

Status
Not open for further replies.

Tacomagic

Bioengineer
Jul 10, 2006
2
Hey there,

I'm trying to create a data collecting GUI in Matlab. I'm fairly new to constructing GUIs in matlab so I need a little help here. I want to create a toggle button that collects data when pressed, and stops collecting data when it is unpressed. However, when pressed the program continuously collects data, and unpressing it does not stop the data collection.

Basically I'm trying to find a way to poll the state of the button within callback for the initial button down. So far I've had no luck as the get(hObject,'value') is unfortunately not updated until after the callback is finished executing.

Any help here is appreciated.
 
Replies continue below

Recommended for you

Never mind figured it out. Felt really dumb when I realized all I needed was the drawnow command. Sigh.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor