Documentation

This is machine translation

Translated by Microsoft
Mouse over text to see original. Click the button below to return to the English verison of the page.

我们为许可用户提供了部分翻译好的中文文档。您只需登录便可查阅这些文档

Assign userpath as Startup Folder (Macintosh or UNIX)

This example shows how to assign the userpath folder as the startup folder on a Macintosh platform. The procedure is similar for UNIX® platforms. Assume that userpath is set to the default value on a Macintosh platform where smith is the home folder.

Using a bash shell, set the MATLAB_USE_USERWORK environment variable so that userpath will be used as the startup folder.

export MATLAB_USE_USERWORK=1

From that shell, start MATLAB®. Next, verify the current folder in MATLAB.

pwd
/Users/smith/Documents/MATLAB

Confirm that this is the same as the folder defined for userpath.

userpath
/Users/smith/Documents/MATLAB;

Confirm that the userpath is at the top of the search path.

path
/Users/smith/Documents/MATLAB
/Users/smith/Applications/MATLAB/R2009a/toolbox/matlab/general
/Users/smith/Applications/MATLAB/R2009a/toolbox/matlab/ops

...
Was this topic helpful?