I am trying to create a simple GUI in Matlab with two push buttons and two static text boxes. The basic premise is that a question will pop up and the user can press either the "yes" or "no" push button, resulting in either another question or an answer (in the second text box). My current problem is that whenever I press "yes," Matlab executes every single command I have written for when the button is pressed. I want to be able to press the button, have a prompt come up, press the button again, have a new prompt come up, etc. So basically, how can I make Matlab follow the user's steps with time, responding to their push differently every time they press the button?