There are multiple MATLAB paths. Here we only talk about the default working path for users who set it to MATLAB at startup.
I do not want to modify the original system file of Matlab, but try to use startup. M. This file is created by default in '/home/R/document/MATLAB'. If not, create the file by yourself. Add at the end of the file
CD 'your own working directory'
MATLAB will load this file at the end of the startup to jump to the desired directory.
For more settings, see configure. For easy access, copy it below. Thanks to the original author.
The default working path after Matlab is started is
... \ Matlab [] \ work (Windows)
... \ My Documents \ MATLAB (Windows)
Or:
/Home/yourname (Linux)
In Windows, many people often use the "starting position" method in the shortcut.
In this way, you can set different shortcuts to use different default start working paths.
For example:
However, if you want to set all the operations for starting MATLAB to the specified directory.
It is better to modify the configuration file.
Method:
In
... \ Matlab [**] \ toolbox \ Local (Windows)
Or
/Matlab [**]/toolbox/local (Linux)
Modify file:
Matlab rc. m
At the end, add:
CD: the default working path you need to set
You can.
For example:
CD/home/Yiling/MATLAB work