How to wait a keypress?

Réponses (1)

Stephen23
Stephen23 le 20 Avr 2015
Modifié(e) : Stephen23 le 20 Avr 2015

0 votes

You can use pause to achieve this.

2 commentaires

Mr M.
Mr M. le 20 Avr 2015
No, no! I would like to wait a specific character! For example pressing "a" to doing something and pressing "b" to do something else!
Stephen23
Stephen23 le 20 Avr 2015
Modifié(e) : Stephen23 le 20 Avr 2015
Then you could try using input, and calling switch with the value that the user inputs.

Connectez-vous pour commenter.

Question posée :

le 20 Avr 2015

Modifié(e) :

le 20 Avr 2015

Community Treasure Hunt

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

Start Hunting!

Translated by