Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有一个非常简单的问题:如何使用类似于 using 的代码终止 matlab 中正在运行的脚本CTRL + C?
如果用户输入错误的数字,我希望程序停止运行。
使用该error功能。有关doc error更多信息,请参阅。
error
doc error
如果处于调试模式,您可以使用dbquit. 如果您在主函数中,则return终止并返回。否则使用该error功能。
dbquit
return