且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

MATLAB系统命令“按Enter退出"

更新时间:2023-12-02 21:34:52

UNIX 上,您可以使用

system('MyProgram < /dev/null'). 

根据 Matlab文档中的建议:

要禁用标准输入和预输入重定向,请包含格式化的 在调用的命令的调用中输入文本< /dev/null.

To disable stdin and type-ahead redirection, include the formatted text < /dev/null in the call to the invoked command.

等效于 Windows (基于 查看全文