Development Environment | ![]() ![]() |
Startup Directory for MATLAB
The initial current directory in MATLAB depends on your platform and installation. You can start MATLAB in a different directory.
Startup Directory on Windows Platforms
On Windows platforms, when you installed MATLAB, the default startup directory was set to $matlabroot\work
, where $matlabroot
is the directory where MATLAB files are installed.
Startup Directory on UNIX Platforms
On UNIX platforms, the initial current directory is the directory you are in on your UNIX file system when you invoke MATLAB.
Changing the Startup Directory
You can start MATLAB in a different directory from the default. The directory you specify will be the current working directory when MATLAB starts. To do so:
startup.m
file - see Using the Startup File for MATLAB, startup.m.startup.m
file, include the cd
function to change to the new directory.startup.m
file in the current startup directory.For Windows Platforms Only. For Windows platforms, you can follow these steps to change the startup directory:
The next time you start MATLAB using that shortcut icon, the current directory will be the one you specified in step 2.
You can make multiple shortcuts to start MATLAB, each with its own startup directory, and each startup directory having different startup options.
![]() | Starting MATLAB | Startup Options | ![]() |