http://www.mathworks.cn/support/solutions/en/data/1-17PSD/index.html?product=ML&solution=1-17PSD
How do I change the directory that MATLAB is initially started in?
Problem Description:
Depending on the version of MATLAB the default directory in which MATLAB for the PC starts varies.
As of MATLAB 5.3, MATLAB will start in the $MATLABROOT/work
For previous versions, by default MATLAB starts in $MATLABROOT/bin (where $MATLABROOT denotes the root directory of MATLAB).
Solution: There are two main ways to change the directory in which MATLAB starts. Note on UNIX the directory is the same as the present working directory. cd D:\my_mfiles
For more information on the use of a STARTUP file please refer to the section titled "Starting MATLAB" in the Using MATLAB manual. You can also refer to the Related Solution for information on how to use the STARTUP file to add paths to your MATLAB session.METHOD 2 (only for Windows): On the PC you can also set the Shortcut properties of the MATLAB icon to specify a 'Start in' directory. To do so, right-click on the MATLAB icon and select 'Properties'. Select the 'Shortcut' tab and place the directory that you wish to have MATLAB start in into the 'Start in' field of the icon's properties.
在XP下,个人觉得第二种方式更简单实用,只用在快捷方式中更改路径即可。不用再做其他设置
|