How to wait a keypress?

Respuestas (1)

Stephen23
Stephen23 el 20 de Abr. de 2015
Editada: Stephen23 el 20 de Abr. de 2015

0 votos

You can use pause to achieve this.

2 comentarios

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

Iniciar sesión para comentar.

Categorías

Más información sobre Loops and Conditional Statements en Centro de ayuda y File Exchange.

Preguntada:

el 20 de Abr. de 2015

Editada:

el 20 de Abr. de 2015

Community Treasure Hunt

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

Start Hunting!

Translated by