3

Matlab 打开和关闭时自动执行的脚本

 3 years ago
source link: https://zhiqiang.org/coding/matlab-startup-finish.html
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

Matlab 打开和关闭时自动执行的脚本

作者: 张志强

, 发表于 2014-07-16

, 共 234 字 , 共阅读 265 次

Matlab 在启动时会自动运行脚本startup.m。在这个脚本里可以自动修改当前目录,修改显示方式等等。比如

cd Z:/ 
format compact 
format short g

同样, Matlab 在退出前会自动运行脚本 finish.m。这个可以用来自动保存数据、清理文件等等。

为让 Matlab 总是能访问到这两个文件,它们最好放在 Matlab 的默认启动路径(比如C:\Program Files\MATLAB\R2014a\bin)。

Q. E. D.

avatar-0.jpg

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK