Starting in R2014b, you can change the startup folder using the General Preferences panel. On the Home tab, in the Environment section, click Preferences. Select MATLAB > General. Choose an option for the Initial working folder.
By default, the initial working folder is set to Location based on MATLAB startup rules.
从 R2014b 开始,您可以使用“常规预设项”面板更改启动文件夹。在主页选项卡上,点击环境部分中的预设。选择 MATLAB > 常规。选择初始工作文件夹选项。
默认情况下,初始工作文件夹设置为基于 MATLAB 启动规则的位置。
但是在配置2017a时,,出现了设置初始文件夹失败 (不是提示,就是按照以上方法设置, 但是一打开,初始工作目录并没有改变。)不知道为啥。
后来通过以下方法设置成功:
- 右击MATLAB启动图标,选择属性
- 在快捷方式选项卡中,有个起始位置
- 在起始位置中,输入