MATLAB 帮助中心
终止 MATLAB 程序
quit
quit cancel
quit force
quit(code)
quit(code,"force")
quit 终止 MATLAB® 程序。quit 函数不会自动保存工作区。
要中断 MATLAB 命令,请参阅停止执行。
quit cancel 适用于 finish.m 脚本,可取消退出。它在其他地方无效。
finish.m
quit force 绕过 finish.m 并终止 MATLAB。当 finish 脚本不允许您退出时,可使用此语法覆盖脚本。
finish
quit(code) 返回指定值作为 MATLAB 退出代码。
code
quit(code,"force") 绕过 finish.m 并终止 MATLAB,同时返回退出代码。
示例: quit(0,"force")
quit(0,"force")
全部折叠
退出代码,指定为有符号整数。在 Windows® 平台上,MATLAB 返回 INT_MIN 至 INT_MAX(-2147483647 至 2147483647)范围内的值。在 Linux® 和 macOS 平台上,MATLAB 返回介于 0 和 255 之间的值。
INT_MIN
INT_MAX
在 macOS 和 Linux 上默认返回退出代码。在 Windows 上,使用 -wait 选项启动 MATLAB。
-wait
示例: quit(1)
quit(1)
点击 MATLAB 桌面上的关闭按钮 。
在 R2006a 之前推出
exit | save | finish
exit
save
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.
选择网站
选择网站以获取翻译的可用内容,以及查看当地活动和优惠。根据您的位置,我们建议您选择:。
您也可以从以下列表中选择网站:
如何获得最佳网站性能
选择中国网站(中文或英文)以获得最佳网站性能。其他 MathWorks 国家/地区网站并未针对您所在位置的访问进行优化。
美洲
欧洲
亚太
联系您当地的办事处