Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我想从 MATLAB 导出和更改 setpath 文件的文件夹。但我不知道这个文件在哪里。
pathdef您可以执行以下操作,而不是直接导出/修改文件:
pathdef
str = path; save myPathBackup.mat str
当您想恢复它时,请执行以下操作:
load myPathBackup.mat path(str)
在 Linux/usr/local/MATLAB/R2012a/toolbox/local/pathdef.m中,您需要将其中的/usr/local/MATLAB/R2012a部分替换为您的安装目录。
/usr/local/MATLAB/R2012a/toolbox/local/pathdef.m
/usr/local/MATLAB/R2012a