Development Environment    

Adding Startup Options for Windows Platforms

You can add selected startup options (also called command flags) to the target path for your Windows shortcut for MATLAB, or include the option if you start MATLAB from a DOS window. To do so:

  1. Right-click on the MATLAB shortcut icon and select Properties from the context menu.

    The Properties dialog box for matlab.exe opens to the Shortcut panel.

  1. In the Target field, after the target path for matlab.exe, add one or more of the allowable startup options listed here.

    Option
    Description
    /automation
    Start MATLAB as an automation server, minimized and without the MATLAB splash screen. For more information, see Client/Server Applications in the Application Program Interface Guide.
    /logfile logfilename
    Automatically write output from MATLAB to the specified log file.
    /minimize
    Start MATLAB minimized and without the MATLAB splash screen.
    /nosplash
    Start MATLAB without displaying the MATLAB splash screen.
    /r M_file
    Automatically run the specified M-file immediately after MATLAB starts. This is also referred to as calling MATLAB in batch mode.
    /regserver
    Modify the Windows registry with the appropriate ActiveX entries for MATLAB. For more information, see Client/Server Applications in the Application Program Interface Guide.
    /unregserver
    Modify the Windows registry to remove the ActiveX entries for MATLAB. Use this option to reset the registry. For more information, see Client/Server Applications in the Application Program Interface Guide.
  2. Click OK.

Example - Setting the Startup Options to Automatically Run an M-File.   To start MATLAB and automatically run the file results.m, use this target path for your Windows shortcut.

Startup Options If You Run MATLAB from a DOS Window.   If you run MATLAB from a DOS window, include the startup options listed in the preceding table after the matlab startup function.

For example, to start MATLAB and automatically run the file results.m , type


 Startup Options Adding Startup Options for UNIX Platforms