How to pause the code?
Ältere Kommentare anzeigen
We can use 'Pause'function to pause what's running(e.g in a for loop).If we want to continue,we can just press the keyboard.Then my question is whether there is a way or another similar function which we can set a flag to pause or to continue.
Akzeptierte Antwort
Weitere Antworten (1)
Youssef Khmou
am 3 Mär. 2013
hi Chan,
you can use the function " keyboard" :
doc keyboard;
When you insert the function in function/script , it stops until you type return .
3 Kommentare
Youssef Khmou
am 3 Mär. 2013
both of them work,
Brian B
am 3 Mär. 2013
True. I didn't read it carefully, and thought you wrote "... until you press return".
Kategorien
Mehr zu Loops and Conditional Statements finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!