Installation guide
Startup Options
Adding Startup Options for Windows Platforms
Yo u can add selected startup options (also called command flags or switches
for the command line) to the target path for your Windows shortcut for
MATLAB. Or you can add them to the command line when you start MATLAB
in a DOS window. On Windows systems a startup option is preceded by
either a hyphen (-) or a slash (/). For example,
-nosplash and /nosplash are
equivalent ways of specifying the
nosplash option for Windows users.
Startup Options in Windows Shor tcut
To use startup options in the Windows shortcut for M ATLAB, fo llow these
steps:
1 Right-click the MATLAB shortcut icon and selec t Properties from
the context m enu. The Properties dialog box for MATLAB opens to the
Shortcut pane.
2 In the Target field, after the target path for matlab.exe,addthestartup
option, and click OK. For example, adding
-r "filename" runs the M-file
filename after startup.
This example instructs MATLAB to automatically run the file
results after
startup, where
results.m is in the startup directory or on the MATLAB
search path. The statement in the Target field might appear as
C:\Program Files\MATLAB\bin\matlab.exe -r "results"
Include the statement in double quotation marks ("statement"). Use only
the filename, not the file extension or pathname. For example, MATLAB
produces an error when you run
... matlab.exe -r "D:\results.m"
Usesemicolonsorcommastoseparatemultiplestatements. Thisexample
changes the format to
short, and then runs the M-file results:
... matlab.exe -r "format('short');results"
Separate multiple options with spaces. This example starts MATLAB without
displaying the splash screen, and then runs the M-file
results:
1-13