matlab中如何终止正在运行的进程?
我有一个非常简单的问题:如何使用代码终止 matlab 中正在运行的脚本,类似于使用 CTRL + C?
如果用户输入不正确的数字,我希望程序停止运行。
I have a pretty simple question: how can I terminate a running script in matlab using code, similar to using CTRL + C?
I want the program to stop running if a user enters incorrect digits.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
如果处于调试模式,您可以使用
dbquit
。如果您位于主函数中,return
将终止并返回。否则使用error
函数。If in debug mode, you can use
dbquit
. if you're in the main function,return
terminates and returns. Otherwise use theerror
function.使用
error
函数。有关详细信息,请参阅文档错误
。Use the
error
function. Seedoc error
for more information.