如何 MATLAB 中用一行指令或函数关闭 windows 操作系统?

我有一个程序需要跑很久,希望能在结束程序且保存结果后,自动关闭电脑。

 Accepted Answer

可以使用:
>> system('shutdown -s')
需要注意的是,这行代码将必定造成电脑关闭,而没有最终确认界面。请一定确认您已经保存了所有数据。

More Answers (0)

Categories

Tags

No tags entered yet.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!