How to implement switch-case statements/keypress functions in GUI? (such that when a button was pressed, it would run the commands like imread/imshow. I would like to assign 10 buttons for 10 different commands.)

10 vues (au cours des 30 derniers jours)
Good day! I have always tried coding switch-case statements but none of those worked for my GUI. I would like to ask for an advice on how to construct simple switch-case statement in GUI that would generate the functions under specific buttons/when a certain keyboard button was pressed. For an example, when the user pressed '1', then the program would display an image. When the user pressed '2', then the program would do another function.

Réponses (1)

Walter Roberson
Walter Roberson le 20 Août 2015

Catégories

En savoir plus sur Startup and Shutdown dans Help Center et File Exchange

Produits

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by