I am trying to create a connect 4 sort of game. When the user selects a button in the GUI I would like a random other button to be pressed as well but in a different color. I thought of using the randi function since all of my buttons are named as "pushbutton#" for (1-42) but I can't figure out how to incorporate that into my code. Thanks all suggestions are welcome.
MATLAB: How to reference random GUI buttons
buttonsgui
Best Answer