For a class project,I am having trouble using the uicontrol feature. I want to have a push button that changes the value of a variable when pressed. I first set the variable exe=1 and I want to set exe=2 when the button is pressed. What I have is listed below.
main_menu=uicontrol('Style','pushbutton','Position',[20 20 100 100],'String','Pong');
If anyone can please help me with this, that would be wonderful. I have spent countless hours trying different things that people say to do with no luck. I have even copied and pasted things into matlab to see what results they find, and I only get error messages. If it matters, I currently have Matlab2018a.