设置matlab启动路径的两种方法
gui设置方法
命令行启动方法
查看matlab.exe的cmd帮助,发现-sd可以实现启动路径的设置。
matlab [-? | -h | -help]
[-c licensefile]
[-nosplash]
[-singleCompThread]
[-batch MATLAB_command | -r MATLAB_command]
[-sd folder | -useStartupFolderPref]
[-logfile log]
[-wait]
[-noFigureWindows]
[-automation] [-regserver] [-unregserver]
[-jdb [port]]
[-nouserjavapath]
[-softwareopengl | -nosoftwareopengl]
-? |-h |-help - Display arguments. Do not start MATLAB.
-c licensefile - Set location of the license file that MATLAB
should use. It can have the form port@host.
The LM_LICENSE_FILE and MLM_LICENSE_FILE
environment variables will be ignored.
-nosplash - Do not display the splash screen during startup.
-singleCompThread - Limit MATLAB to a single computational thread.
By default, MATLAB makes use of the multithreading
capabilities of the computer on which it is running.
-batch MATLAB_command - Start MATLAB and execute the MATLAB command(s) with no desktop
and certain interactive capabilities disabled. Terminates
upon successful completion of the command and returns exit
code 0. Upon failure, MATLAB terminates with a non-zero exit.
Cannot be combined with -r.
-r MATLAB_command - Start MATLAB and execute the MATLAB_command.
Cannot be combined with -batch.
-sd folder - Set the MATLAB startup folder to folder, specified as a string.
Cannot be combined with -useStartupFolderPref.
-useStartupFolderPref - Set the MATLAB startup folder to the value
specified by the Initial working folder option
in the General Preferences panel.
Cannot be combined with -sd.
-logfile log - Make a copy of any output to the command window
in file log. This includes all crash reports.
-wait - MATLAB is started by a separate starter program
which normally launches MATLAB and then immediately
quits. Using the -wait option tells the starter
program not to quit until MATLAB has terminated.
This option is useful when you need to process the
the results from MATLAB in a script. The call to
MATLAB with this option will block the script from
continuing until the results are generated.
-noFigureWindows - Never display a figure window
-automation - Start MATLAB as an automation server,
minimized and without the MATLAB splash screen.
-jdb [port] - Enable remote Java debugging on port (default 4444)
-regserver - Register MATLAB as a COM server
-unregserver - Remove MATLAB COM server registry entries.
-nouserjavapath - Ignore custom javaclasspath.txt and
javalibrarypath.txt files.
-softwareopengl - Force MATLAB to start with software OpenGL
libraries.
-nosoftwareopengl - Disable auto-selection of software OpenGL
when a graphics driver with known issues is detected.
Version: 9.13.0,1967605
matlab.exe -sd "D:\Coding\MatlabWD"