How to wait a keypress?

Risposte (1)

Stephen23
Stephen23 il 20 Apr 2015
Modificato: Stephen23 il 20 Apr 2015

0 voti

You can use pause to achieve this.

2 Commenti

Mr M.
Mr M. il 20 Apr 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 il 20 Apr 2015
Modificato: Stephen23 il 20 Apr 2015
Then you could try using input, and calling switch with the value that the user inputs.

Accedi per commentare.

Richiesto:

il 20 Apr 2015

Modificato:

il 20 Apr 2015

Community Treasure Hunt

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

Start Hunting!

Translated by