How to wait a keypress?

Antworten (1)

Stephen23
Stephen23 am 20 Apr. 2015
Bearbeitet: Stephen23 am 20 Apr. 2015

0 Stimmen

You can use pause to achieve this.

2 Kommentare

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

Melden Sie sich an, um zu kommentieren.

Gefragt:

am 20 Apr. 2015

Bearbeitet:

am 20 Apr. 2015

Community Treasure Hunt

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

Start Hunting!

Translated by