I am fairly new to MatLab GUI building and I have a "continue" button in the GUI.
So basically, at some point in my program, the program has to wait for the user to click on the "continue" button to keep going.
The only way I can think of doing this is to make the program loop infinitely in a while loop until the button is clicked and it exits the loop. This does not seem to work.
So the loop is as follows:
while (get(handles.continue,'value')) == 0
disp('in the loop')
guidata(hObject,handles);
end
However, it is not exiting the loop. I tried changing the button from a pushbutton
to a togglebutton
but it would not exit the loop.
I know it is not the most efficient way to make the program wait but can anyone tell me why it is not exiting that loop or suggest a more efficient way?