MATLAB默认工作目录设定

MATLAB启动后,自动执行的代码为

C:\Program Files\MATLAB\R2017b\toolbox\local\matlabrc.m

MATLAB对这个脚本的描述:

%MATLABRC Master startup MATLAB script.
%   MATLABRC is automatically executed by MATLAB during startup.
%   It establishes the MATLAB path, sets the default figure size,
%   and sets a few uicontrol defaults.
%
%   On multi-user or networked systems, the system manager can put
%   any messages, definitions, etc. that apply to all users here.
%
%   MATLABRC also invokes a STARTUP command if the file 'startup.m'
%   exists on the MATLAB path.

要想改变默认工作目录,给这个脚本追加一个cd操作:

cd C:\Users\think\Documents\MATLAB

 

posted @ 2020-04-03 11:15  ygpygp1234  阅读(499)  评论(0)    收藏  举报