设置matlab启动路径的两种方法

文章介绍了设置MATLAB启动路径的两种方式:通过GUI设置和使用命令行参数。在命令行中,可以使用`matlab.exe-sd路径`来指定启动目录,或者利用其他参数如`-nosplash`、`-batch`等进行不同模式的启动。
摘要由CSDN通过智能技术生成

设置matlab启动路径的两种方法

gui设置方法

matlab-gui-preset

命令行启动方法

查看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"
  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值