Can I Use the Special Function Keys to Interrupt a Script?
Ältere Kommentare anzeigen
Back in the old QuickBasic and early Visual Basic days I would write code that allow me to interrupt a running algorithm by pressing a special function key. Is there a similar function in today's Matlab?
Thanks,
Dave
Akzeptierte Antwort
Weitere Antworten (1)
Kye Taylor
am 23 Aug. 2012
0 Stimmen
Ctrl+C will kill a running script/function
2 Kommentare
David Koenig
am 23 Aug. 2012
Kye Taylor
am 23 Aug. 2012
Forgive me if you know about breakpoints and using the debugger, but you can place the command
keyboard
in a script, and it will pause execution of the script just like a breakpoint. Althought this requires knowing a priori where you want stop a scripts execution.
Another alternative is to set a conditional/error breakpoint that will pause execution when a condition is met that you specify.
Kategorien
Mehr zu Characters and Strings finden Sie in Hilfe-Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!